home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / mail / mh / updates / MH.6.8.Z / MH.6.8
Encoding:
Text File  |  1992-12-14  |  1.3 MB  |  55,593 lines

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1. *** ../mh-6.7.2/Patchlevel    Wed Jan 22 13:37:46 1992
  2. --- Patchlevel    Mon Dec 14 16:24:15 1992
  3. ***************
  4. *** 1 ****
  5. ! MH.6.7 patch.2
  6. --- 1 ----
  7. ! MH.6.8 patch.0
  8. *** ../mh-6.7.2/conf/Makefile    Thu Apr  5 16:05:23 1990
  9. --- conf/Makefile    Mon Oct 26 14:36:23 1992
  10. ***************
  11. *** 3,5 ****
  12.   ######################################################################
  13. ! # @(#)$Id: Makefile,v 2.2 90/04/05 15:18:33 sources Exp $
  14.   
  15. --- 3,7 ----
  16.   ######################################################################
  17. ! # @(#)$Id: Makefile,v 2.3 1992/10/26 22:36:21 jromine Exp $
  18. ! SHELL    =    /bin/sh
  19.   
  20. *** ../mh-6.7.2/conf/config/config.c    Fri Jan 24 17:10:25 1992
  21. --- conf/config/config.c    Mon Nov 16 14:51:06 1992
  22. ***************
  23. *** 1,7 ****
  24.   /* config.c - master MH configuration file */
  25.   #ifndef    lint
  26. ! static char ident[] = "@(#)$Id: config.c,v 1.5 1992/01/24 00:35:28 jromine Exp $";
  27. ! #endif    lint
  28.   
  29.   /* @(MHWARNING) */
  30.   
  31. --- 1,7 ----
  32.   /* config.c - master MH configuration file */
  33.   #ifndef    lint
  34. ! static char ident[] = "@(#)$Id: config.c,v 1.9 1992/11/05 16:59:39 jromine Exp $";
  35. ! #endif    /* lint */
  36.   
  37.   /* @(MHWARNING) */
  38.   
  39. ***************
  40. *** 10,20 ****
  41.   #include "../h/mh.h"
  42.   #ifdef    MHRC
  43.   #include <pwd.h>
  44. ! #endif    MHRC
  45.   #include <stdio.h>
  46.   
  47.   
  48. ! #if    defined(__STDC__) && !defined(__HIGHC__)
  49.   #define    binpath(file) "@(MHBINPATH)/"#file
  50.   #define    etcpath(file) "@(MHETCPATH)/"#file
  51.   #else
  52. --- 10,20 ----
  53.   #include "../h/mh.h"
  54.   #ifdef    MHRC
  55.   #include <pwd.h>
  56. ! #endif /* MHRC */
  57.   #include <stdio.h>
  58.   
  59.   
  60. ! #if    defined(__STDC__)
  61.   #define    binpath(file) "@(MHBINPATH)/"#file
  62.   #define    etcpath(file) "@(MHETCPATH)/"#file
  63.   #else
  64. ***************
  65. *** 27,37 ****
  66.   @(MHCONFIG)
  67.   
  68.   
  69.   #ifdef    MHRC
  70.   #ifdef    SYS5
  71.   struct passwd *getpwnam ();
  72. ! #endif    SYS5
  73. ! #endif    MHRC
  74.   
  75.   /*   */
  76.   
  77. --- 27,39 ----
  78.   @(MHCONFIG)
  79.   
  80.   
  81. + #ifndef    __STDC__
  82.   #ifdef    MHRC
  83.   #ifdef    SYS5
  84.   struct passwd *getpwnam ();
  85. ! #endif /* SYS5 */
  86. ! #endif /* MHRC */
  87. ! #endif
  88.   
  89.   /*   */
  90.   
  91. ***************
  92. *** 44,54 ****
  93.   #ifdef    MHRC
  94.       char   *pp;
  95.       struct passwd  *pw;
  96. ! #endif    MHRC
  97.   
  98.   #ifdef    MHRC
  99.       m_getdefs ();
  100. ! #endif    MHRC
  101.   
  102.       switch (*file) {
  103.       case '/': 
  104. --- 46,56 ----
  105.   #ifdef    MHRC
  106.       char   *pp;
  107.       struct passwd  *pw;
  108. ! #endif /* MHRC */
  109.   
  110.   #ifdef    MHRC
  111.       m_getdefs ();
  112. ! #endif /* MHRC */
  113.   
  114.       switch (*file) {
  115.       case '/': 
  116. ***************
  117. *** 57,64 ****
  118.   #ifdef    MHRC
  119.       case '~': 
  120.           if (cp = index (pp = file + 1, '/'))
  121. !         *cp++ = NULL;
  122. !         if (*pp == NULL)
  123.           pp = mypath;
  124.           else
  125.           if (pw = getpwnam (pp))
  126. --- 59,66 ----
  127.   #ifdef    MHRC
  128.       case '~': 
  129.           if (cp = index (pp = file + 1, '/'))
  130. !         *cp++ = '\0';
  131. !         if (*pp == '\0')
  132.           pp = mypath;
  133.           else
  134.           if (pw = getpwnam (pp))
  135. ***************
  136. *** 76,82 ****
  137.           if (access (lpath, 04) != NOTOK)
  138.           return lpath;    /* else fall */
  139.       try_it: ;
  140. ! #endif    MHRC
  141.   
  142.       default: 
  143.           if (access ((cp = m_mailpath (file)), 04) != NOTOK)
  144. --- 78,84 ----
  145.           if (access (lpath, 04) != NOTOK)
  146.           return lpath;    /* else fall */
  147.       try_it: ;
  148. ! #endif /* MHRC */
  149.   
  150.       default: 
  151.           if (access ((cp = m_mailpath (file)), 04) != NOTOK)
  152. ***************
  153. *** 96,102 ****
  154.   struct swit anoyes[] = {
  155.       "no", 0,
  156.       "yes", 0,
  157. !     NULL, NULL
  158.   };
  159.   
  160.   /*   */
  161. --- 98,104 ----
  162.   struct swit anoyes[] = {
  163.       "no", 0,
  164.       "yes", 0,
  165. !     NULL, 0
  166.   };
  167.   
  168.   /*   */
  169. ***************
  170. *** 112,117 ****
  171. --- 114,120 ----
  172.   char   *distcomps = "distcomps";
  173.   char   *draft = "draft";
  174.   char   *forwcomps = "forwcomps";
  175. + char   *inbox = "inbox";
  176.   char   *mh_defaults = etcpath (mh.profile);
  177.   char   *mh_profile = ".mh_profile";
  178.   char   *mhlformat = "mhl.format";
  179. ***************
  180. *** 131,139 ****
  181.   char   *context = "context";
  182.   #ifndef    NOMHSEQ
  183.   char   *mh_seq = ".mh_sequences";
  184. ! #else    NOMHSEQ
  185.   char   *mh_seq = NULL;
  186. ! #endif    NOMHSEQ
  187.   
  188.   
  189.   /* 
  190. --- 134,142 ----
  191.   char   *context = "context";
  192.   #ifndef    NOMHSEQ
  193.   char   *mh_seq = ".mh_sequences";
  194. ! #else /* NOMHSEQ */
  195.   char   *mh_seq = NULL;
  196. ! #endif /* NOMHSEQ */
  197.   
  198.   
  199.   /* 
  200. ***************
  201. *** 193,201 ****
  202.   
  203.   #ifndef    MORE
  204.   char   *lproc = "/usr/ucb/more";
  205. ! #else    MORE
  206.   char   *lproc = MORE;
  207. ! #endif    MORE
  208.   
  209.   
  210.   /*
  211. --- 196,204 ----
  212.   
  213.   #ifndef    MORE
  214.   char   *lproc = "/usr/ucb/more";
  215. ! #else /* MORE */
  216.   char   *lproc = MORE;
  217. ! #endif /* MORE */
  218.   
  219.   
  220.   /*
  221. ***************
  222. *** 211,219 ****
  223.   
  224.   #ifndef    MORE
  225.   char   *moreproc = "/usr/ucb/more";
  226. ! #else    MORE
  227.   char   *moreproc = MORE;
  228. ! #endif    MORE
  229.   
  230.   
  231.   /* 
  232. --- 214,222 ----
  233.   
  234.   #ifndef    MORE
  235.   char   *moreproc = "/usr/ucb/more";
  236. ! #else /* MORE */
  237.   char   *moreproc = MORE;
  238. ! #endif /* MORE */
  239.   
  240.   
  241.   /* 
  242. ***************
  243. *** 248,254 ****
  244.   char   *postproc = etcpath (spost);
  245.   #else
  246.   char   *postproc = etcpath (post);
  247. ! #endif BERK
  248.   
  249.   
  250.   /* 
  251. --- 251,257 ----
  252.   char   *postproc = etcpath (spost);
  253.   #else
  254.   char   *postproc = etcpath (post);
  255. ! #endif /* BERK */
  256.   
  257.   
  258.   /* 
  259. ***************
  260. *** 281,289 ****
  261.   
  262.   #ifndef    MORE
  263.   char   *showproc = "/usr/ucb/more";
  264. ! #else    MORE
  265.   char   *showproc = MORE;
  266. ! #endif    MORE
  267.   
  268.   
  269.   /* 
  270. --- 284,292 ----
  271.   
  272.   #ifndef    MORE
  273.   char   *showproc = "/usr/ucb/more";
  274. ! #else /* MORE */
  275.   char   *showproc = MORE;
  276. ! #endif /* MORE */
  277.   
  278.   
  279.   /* 
  280. ***************
  281. *** 347,353 ****
  282.   
  283.   #ifndef    FOLDPROT
  284.   #define    FOLDPROT    "0711"
  285. ! #endif    not FOLDPROT
  286.   
  287.   char   *foldprot = FOLDPROT;
  288.   
  289. --- 350,356 ----
  290.   
  291.   #ifndef    FOLDPROT
  292.   #define    FOLDPROT    "0711"
  293. ! #endif /* not FOLDPROT */
  294.   
  295.   char   *foldprot = FOLDPROT;
  296.   
  297. ***************
  298. *** 360,365 ****
  299.   
  300.   #ifndef    MSGPROT
  301.   #define    MSGPROT        "0644"
  302. ! #endif    not MSGPROT
  303.   
  304.   char   *msgprot = MSGPROT;
  305. --- 363,368 ----
  306.   
  307.   #ifndef    MSGPROT
  308.   #define    MSGPROT        "0644"
  309. ! #endif /* not MSGPROT */
  310.   
  311.   char   *msgprot = MSGPROT;
  312. *** ../mh-6.7.2/conf/config/mts.c    Thu Feb 14 15:18:22 1991
  313. --- conf/config/mts.c    Tue Nov 24 10:40:38 1992
  314. ***************
  315. *** 1,7 ****
  316.   /* mts.c - definitions for the mail transport system */
  317.   #ifndef    lint
  318. ! static char ident[] = "@(#)$Id: mts.c,v 2.7 91/02/14 15:17:56 mh Exp $";
  319. ! #endif    lint
  320.   
  321.   /* LINTLIBRARY */
  322.   
  323. --- 1,7 ----
  324.   /* mts.c - definitions for the mail transport system */
  325.   #ifndef    lint
  326. ! static char ident[] = "@(#)$Id: mts.c,v 2.16 1992/11/24 18:40:34 jromine Exp $";
  327. ! #endif /* lint */
  328.   
  329.   /* LINTLIBRARY */
  330.   
  331. ***************
  332. *** 8,14 ****
  333.   #undef    NETWORK
  334.   #if    defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
  335.   #define    NETWORK
  336. ! #endif    not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS))
  337.   
  338.   #include "../h/strings.h"
  339.   #include <ctype.h>
  340. --- 8,14 ----
  341.   #undef    NETWORK
  342.   #if    defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
  343.   #define    NETWORK
  344. ! #endif
  345.   
  346.   #include "../h/strings.h"
  347.   #include <ctype.h>
  348. ***************
  349. *** 17,30 ****
  350.   #ifdef    NETWORK
  351.   #if    defined(BSD42) || defined(SOCKETS)
  352.   #include <netdb.h>
  353. ! #endif    BSD42 or SOCKETS
  354. ! #else    not NETWORK
  355.   #ifndef SYS5
  356.   #include <whoami.h>
  357. ! #else SYS5
  358.   #include <sys/utsname.h>
  359. ! #endif SYS5
  360. ! #endif    not NETWORK
  361.   #include <pwd.h>
  362.   
  363.   
  364. --- 17,30 ----
  365.   #ifdef    NETWORK
  366.   #if    defined(BSD42) || defined(SOCKETS)
  367.   #include <netdb.h>
  368. ! #endif
  369. ! #else    /* NETWORK */
  370.   #ifndef SYS5
  371.   #include <whoami.h>
  372. ! #else
  373.   #include <sys/utsname.h>
  374. ! #endif /* SYS5 */
  375. ! #endif /* NETWORK */
  376.   #include <pwd.h>
  377.   
  378.   
  379. ***************
  380. *** 35,51 ****
  381.   
  382.   extern int  errno;
  383.   
  384. ! char   *tailor_value ();
  385.   
  386.   
  387. ! #ifdef    SYS5
  388.   #define    index    strchr
  389.   #define    rindex    strrchr
  390. ! #endif    SYS5
  391.   
  392.   char   *index (), *malloc (), *mktemp (), *rindex (), *strcpy ();
  393.   
  394.   struct passwd  *getpwuid ();
  395.   
  396.   /*   */
  397.   
  398. --- 35,55 ----
  399.   
  400.   extern int  errno;
  401.   
  402. ! static char   *tailor_value ();
  403.   
  404.   
  405. ! #if defined(SYS5) && !defined(_AIX)
  406.   #define    index    strchr
  407.   #define    rindex    strrchr
  408. ! #endif /* SYS5 */
  409.   
  410. + #if !defined(__STDC__) && !defined(_AIX) && !defined(_POSIX_SOURCE)
  411.   char   *index (), *malloc (), *mktemp (), *rindex (), *strcpy ();
  412.   
  413. + #ifdef    SYS5
  414.   struct passwd  *getpwuid ();
  415. + #endif
  416. + #endif /* !__STDC__ */
  417.   
  418.   /*   */
  419.   
  420. ***************
  421. *** 60,69 ****
  422.   static char *mtstailor = "@(MHETCPATH)/mtstailor";
  423.   
  424.   static char    *localname = "";
  425.   static char    *systemname = "";
  426.   #ifdef    MF
  427.   static char    *UUCPchan = "";
  428. ! #endif    MF
  429.   char    *mmdfldir = "@(MHDROPATH)";
  430.   char    *mmdflfil = "@(MHDROPFIL)";
  431.   char    *uucpldir = "/usr/spool/mail";
  432. --- 64,74 ----
  433.   static char *mtstailor = "@(MHETCPATH)/mtstailor";
  434.   
  435.   static char    *localname = "";
  436. + static char    *localdomain = "";
  437.   static char    *systemname = "";
  438.   #ifdef    MF
  439.   static char    *UUCPchan = "";
  440. ! #endif /* MF */
  441.   char    *mmdfldir = "@(MHDROPATH)";
  442.   char    *mmdflfil = "@(MHDROPFIL)";
  443.   char    *uucpldir = "/usr/spool/mail";
  444. ***************
  445. *** 80,88 ****
  446.   
  447.   #ifdef    MF
  448.   char   *umincproc = "@(MHETCPATH)/uminc";
  449. ! #else    MF
  450.   char   *umincproc = NULL;
  451. ! #endif    MF
  452.   
  453.   
  454.   int    lockstyle = LOK_UNIX;
  455. --- 85,93 ----
  456.   
  457.   #ifdef    MF
  458.   char   *umincproc = "@(MHETCPATH)/uminc";
  459. ! #else /* MF */
  460.   char   *umincproc = NULL;
  461. ! #endif /* MF */
  462.   
  463.   
  464.   int    lockstyle = LOK_UNIX;
  465. ***************
  466. *** 107,121 ****
  467.   static char *tmpmode = "0600";
  468.   char   *Okhosts = "@(MHETCPATH)/Rmail.OkHosts";
  469.   char   *Okdests = "@(MHETCPATH)/Rmail.OkDests";
  470. ! #endif    MHMTS
  471.   
  472.   #ifdef    MMDFMTS
  473. ! #endif    MMDFMTS
  474.   
  475.   #ifdef    SENDMTS
  476.   char   *hostable = "@(MHETCPATH)/hosts";
  477.   char   *sendmail = "/usr/lib/sendmail";
  478. ! #endif    SENDMTS
  479.   
  480.   
  481.   /* SMTP/POP stuff */
  482. --- 112,126 ----
  483.   static char *tmpmode = "0600";
  484.   char   *Okhosts = "@(MHETCPATH)/Rmail.OkHosts";
  485.   char   *Okdests = "@(MHETCPATH)/Rmail.OkDests";
  486. ! #endif /* MHMTS */
  487.   
  488.   #ifdef    MMDFMTS
  489. ! #endif /* MMDFMTS */
  490.   
  491.   #ifdef    SENDMTS
  492.   char   *hostable = "@(MHETCPATH)/hosts";
  493.   char   *sendmail = "/usr/lib/sendmail";
  494. ! #endif /* SENDMTS */
  495.   
  496.   
  497.   /* SMTP/POP stuff */
  498. ***************
  499. *** 135,141 ****
  500.   char    *popbbhost = "";
  501.   char    *popbbuser = "";
  502.   char    *popbblist = "@(MHETCPATH)/hosts.popbb";
  503. ! #endif    BPOP
  504.   
  505.   
  506.   /* MailDelivery */
  507. --- 140,146 ----
  508.   char    *popbbhost = "";
  509.   char    *popbbuser = "";
  510.   char    *popbblist = "@(MHETCPATH)/hosts.popbb";
  511. ! #endif /* BPOP */
  512.   
  513.   
  514.   /* MailDelivery */
  515. ***************
  516. *** 158,167 ****
  517.       char  **value;
  518.   }       binds[] = {
  519.       "localname", &localname,
  520.       "systemname", &systemname,
  521.   #ifdef    MF
  522.       "uucpchan", &UUCPchan,
  523. ! #endif    MF
  524.       "mmdfldir", &mmdfldir,
  525.       "mmdflfil", &mmdflfil,
  526.       "uucpldir", &uucpldir,
  527. --- 163,173 ----
  528.       char  **value;
  529.   }       binds[] = {
  530.       "localname", &localname,
  531. +     "localdomain", &localdomain,
  532.       "systemname", &systemname,
  533.   #ifdef    MF
  534.       "uucpchan", &UUCPchan,
  535. ! #endif /* MF */
  536.       "mmdfldir", &mmdfldir,
  537.       "mmdflfil", &mmdflfil,
  538.       "uucpldir", &uucpldir,
  539. ***************
  540. *** 185,199 ****
  541.       "tmpmode", &tmpmode,
  542.       "okhosts", &Okhosts,
  543.       "okdests", &Okdests,
  544. ! #endif    MHMTS
  545.   
  546.   #ifdef    MMDFMTS
  547. ! #endif    MMDFMTS
  548.   
  549.   #ifdef    SENDMTS
  550.       "hostable", &hostable,
  551.       "sendmail", &sendmail,
  552. ! #endif    SENDMTS
  553.   
  554.       "servers", &servers,
  555.       "pophost", &pophost,
  556. --- 191,205 ----
  557.       "tmpmode", &tmpmode,
  558.       "okhosts", &Okhosts,
  559.       "okdests", &Okdests,
  560. ! #endif /* MHMTS */
  561.   
  562.   #ifdef    MMDFMTS
  563. ! #endif /* MMDFMTS */
  564.   
  565.   #ifdef    SENDMTS
  566.       "hostable", &hostable,
  567.       "sendmail", &sendmail,
  568. ! #endif /* SENDMTS */
  569.   
  570.       "servers", &servers,
  571.       "pophost", &pophost,
  572. ***************
  573. *** 204,213 ****
  574.       "popbbhost", &popbbhost,
  575.       "popbbuser", &popbbuser,
  576.       "popbblist", &popbblist,
  577. ! #endif    BPOP
  578.   #ifdef    NNTP
  579.       "nntphost", &popbbhost,
  580. ! #endif    NNTP
  581.   
  582.       "maildelivery", &maildelivery,
  583.   
  584. --- 210,219 ----
  585.       "popbbhost", &popbbhost,
  586.       "popbbuser", &popbbuser,
  587.       "popbblist", &popbblist,
  588. ! #endif /* BPOP */
  589.   #ifdef    NNTP
  590.       "nntphost", &popbbhost,
  591. ! #endif /* NNTP */
  592.   
  593.       "maildelivery", &maildelivery,
  594.   
  595. ***************
  596. *** 240,253 ****
  597.       while (fgets (buffer, sizeof buffer, fp)) {
  598.       if ((cp = index (buffer, '\n')) == NULL)
  599.           break;
  600. !     *cp = NULL;
  601. !     if (*buffer == '#' || *buffer == NULL)
  602.           continue;
  603.       if ((bp = index (buffer, ':')) == NULL)
  604.           break;
  605. !     *bp++ = NULL;
  606.       while (isspace (*bp))
  607. !         *bp++ = NULL;
  608.   
  609.       for (b = binds; b -> keyword; b++)
  610.           if (strcmp (buffer, b -> keyword) == 0)
  611. --- 246,259 ----
  612.       while (fgets (buffer, sizeof buffer, fp)) {
  613.       if ((cp = index (buffer, '\n')) == NULL)
  614.           break;
  615. !     *cp = 0;
  616. !     if (*buffer == '#' || *buffer == '\0')
  617.           continue;
  618.       if ((bp = index (buffer, ':')) == NULL)
  619.           break;
  620. !     *bp++ = 0;
  621.       while (isspace (*bp))
  622. !         *bp++ = 0;
  623.   
  624.       for (b = binds; b -> keyword; b++)
  625.           if (strcmp (buffer, b -> keyword) == 0)
  626. ***************
  627. *** 264,270 ****
  628.   #ifdef    MHMTS
  629.       Syscpy = atoi (syscpy);
  630.       (void) sscanf (tmpmode, "0%o", &Tmpmode);
  631. ! #endif    MHMTS
  632.       Everyone = atoi (everyone);
  633.   }
  634.   
  635. --- 270,276 ----
  636.   #ifdef    MHMTS
  637.       Syscpy = atoi (syscpy);
  638.       (void) sscanf (tmpmode, "0%o", &Tmpmode);
  639. ! #endif /* MHMTS */
  640.       Everyone = atoi (everyone);
  641.   }
  642.   
  643. ***************
  644. *** 292,298 ****
  645.           grot ('t', '\t');
  646.   #undef    grot
  647.   
  648. !         case NULL: s--;
  649.           case QUOTE: 
  650.               *bp = QUOTE;
  651.               break;
  652. --- 298,304 ----
  653.           grot ('t', '\t');
  654.   #undef    grot
  655.   
  656. !         case 0: s--;
  657.           case QUOTE: 
  658.               *bp = QUOTE;
  659.               break;
  660. ***************
  661. *** 309,315 ****
  662.               *bp = toascii (i);
  663.               break;
  664.           }
  665. !     *bp = NULL;
  666.   
  667.       bp = malloc ((unsigned) (strlen (buffer) + 1));
  668.       if (bp != NULL)
  669. --- 315,321 ----
  670.               *bp = toascii (i);
  671.               break;
  672.           }
  673. !     *bp = 0;
  674.   
  675.       bp = malloc ((unsigned) (strlen (buffer) + 1));
  676.       if (bp != NULL)
  677. ***************
  678. *** 323,335 ****
  679.   char   *LocalName () {
  680.   #ifdef    BSD41A
  681.       char  *myname;
  682. ! #endif    BSD41A
  683.   #if    defined(BSD42) || defined(SOCKETS)
  684.       register struct hostent *hp;
  685. ! #endif    BSD42 or SOCKETS
  686.   #if    defined(SYS5) && !defined(NETWORK)
  687.       struct utsname name;
  688. ! #endif    SYS5 and not NETWORK
  689.       static char buffer[BUFSIZ] = "";
  690.   
  691.       if (buffer[0])
  692. --- 329,341 ----
  693.   char   *LocalName () {
  694.   #ifdef    BSD41A
  695.       char  *myname;
  696. ! #endif /* BSD41A */
  697.   #if    defined(BSD42) || defined(SOCKETS)
  698.       register struct hostent *hp;
  699. ! #endif /* BSD42 or SOCKETS */
  700.   #if    defined(SYS5) && !defined(NETWORK)
  701.       struct utsname name;
  702. ! #endif /* SYS5 and not NETWORK */
  703.       static char buffer[BUFSIZ] = "";
  704.   
  705.       if (buffer[0])
  706. ***************
  707. *** 337,347 ****
  708.   
  709.       mts_init ("mts");
  710.       if (*localname)
  711. !     return strcpy (buffer, localname);
  712.   
  713.   #ifdef    locname
  714.       (void) strcpy (buffer, locname);
  715. ! #else    not locname
  716.   #ifdef    NETWORK
  717.   #ifdef    BSD41A
  718.       myname = "myname";
  719. --- 343,354 ----
  720.   
  721.       mts_init ("mts");
  722.       if (*localname)
  723. !     strcpy (buffer, localname);
  724. !     else {
  725.   
  726.   #ifdef    locname
  727.       (void) strcpy (buffer, locname);
  728. ! #else /* not locname */
  729.   #ifdef    NETWORK
  730.   #ifdef    BSD41A
  731.       myname = "myname";
  732. ***************
  733. *** 351,357 ****
  734.       (void) strcpy (buffer, myname);
  735.       free (myname);
  736.       }
  737. ! #endif    BSD41A
  738.   #if    defined(BSD42) || defined(SOCKETS)
  739.       (void) gethostname (buffer, sizeof buffer);
  740.   #ifndef    BIND
  741. --- 358,364 ----
  742.       (void) strcpy (buffer, myname);
  743.       free (myname);
  744.       }
  745. ! #endif /* BSD41A */
  746.   #if    defined(BSD42) || defined(SOCKETS)
  747.       (void) gethostname (buffer, sizeof buffer);
  748.   #ifndef    BIND
  749. ***************
  750. *** 359,375 ****
  751.   #endif
  752.       if (hp = gethostbyname (buffer))
  753.       (void) strcpy (buffer, hp -> h_name);
  754. ! #endif    BSD42 or SOCKETS
  755. ! #else    not NETWORK
  756.   #ifndef    SYS5
  757.       (void) strcpy (buffer, SystemName ());
  758. ! #else    SYS5
  759.       (void) uname (&name);
  760.       (void) strcpy (buffer, name.nodename);
  761. ! #endif    SYS5
  762. ! #endif    not NETWORK
  763. ! #endif    not locname
  764.       return buffer;
  765.   }
  766.   
  767. --- 366,386 ----
  768.   #endif
  769.       if (hp = gethostbyname (buffer))
  770.       (void) strcpy (buffer, hp -> h_name);
  771. ! #endif /* BSD42 or SOCKETS */
  772. ! #else /* not NETWORK */
  773.   #ifndef    SYS5
  774.       (void) strcpy (buffer, SystemName ());
  775. ! #else /* SYS5 */
  776.       (void) uname (&name);
  777.       (void) strcpy (buffer, name.nodename);
  778. ! #endif /* SYS5 */
  779. ! #endif /* not NETWORK */
  780. ! #endif /* not locname */
  781. !     }
  782. !     if (*localdomain) {
  783. !     strcat (buffer, ".");
  784. !     strcat (buffer, localdomain);
  785. !     }
  786.       return buffer;
  787.   }
  788.   
  789. ***************
  790. *** 378,384 ****
  791.   char *SystemName () {
  792.   #if    defined(SYS5) && !defined(NETWORK)
  793.       struct utsname name;
  794. ! #endif    SYS5 and not NETWORK
  795.       static char buffer[BUFSIZ] = "";
  796.   
  797.       if (buffer[0])
  798. --- 389,395 ----
  799.   char *SystemName () {
  800.   #if    defined(SYS5) && !defined(NETWORK)
  801.       struct utsname name;
  802. ! #endif /* SYS5 and not NETWORK */
  803.       static char buffer[BUFSIZ] = "";
  804.   
  805.       if (buffer[0])
  806. ***************
  807. *** 390,405 ****
  808.   
  809.   #ifdef    sysname
  810.       (void) strcpy (buffer, sysname);
  811. ! #else    sysname
  812.   #if    !defined(SYS5) || defined(NETWORK)
  813.       (void) gethostname (buffer, sizeof buffer);
  814. ! #else    SYS5 and not NETWORK
  815.   #ifdef    SYS5
  816.       (void) uname (&name);
  817.       (void) strcpy (buffer, name.nodename);
  818. ! #endif  SYS5
  819. ! #endif  SYS5 and not NETWORK
  820. ! #endif    sysname
  821.   
  822.       return buffer;
  823.   }
  824. --- 401,416 ----
  825.   
  826.   #ifdef    sysname
  827.       (void) strcpy (buffer, sysname);
  828. ! #else /* sysname */
  829.   #if    !defined(SYS5) || defined(NETWORK)
  830.       (void) gethostname (buffer, sizeof buffer);
  831. ! #else /* SYS5 and not NETWORK */
  832.   #ifdef    SYS5
  833.       (void) uname (&name);
  834.       (void) strcpy (buffer, name.nodename);
  835. ! #endif /* SYS5 */
  836. ! #endif /* SYS5 and not NETWORK */
  837. ! #endif /* sysname */
  838.   
  839.       return buffer;
  840.   }
  841. ***************
  842. *** 409,419 ****
  843.   char   *UucpChan () {
  844.   #ifdef    MF
  845.       static char buffer[BUFSIZ] = "";
  846. ! #endif    MF
  847.   
  848.   #ifndef    MF
  849.       return NULL;
  850. ! #else    MF
  851.       if (buffer[0])
  852.       return buffer;
  853.   
  854. --- 420,430 ----
  855.   char   *UucpChan () {
  856.   #ifdef    MF
  857.       static char buffer[BUFSIZ] = "";
  858. ! #endif /* MF */
  859.   
  860.   #ifndef    MF
  861.       return NULL;
  862. ! #else /* MF */
  863.       if (buffer[0])
  864.       return buffer;
  865.   
  866. ***************
  867. *** 423,433 ****
  868.   
  869.   #ifdef    uucpchan
  870.       (void) strcpy (buffer, uucpchan);
  871. ! #else    uucpchan
  872.       (void) strcpy (buffer, "uucp");
  873. ! #endif    uucpchan
  874.       return buffer;
  875. ! #endif    MF
  876.   }
  877.   
  878.   /*   */
  879. --- 434,444 ----
  880.   
  881.   #ifdef    uucpchan
  882.       (void) strcpy (buffer, uucpchan);
  883. ! #else /* uucpchan */
  884.       (void) strcpy (buffer, "uucp");
  885. ! #endif /* uucpchan */
  886.       return buffer;
  887. ! #endif /* MF */
  888.   }
  889.   
  890.   /*   */
  891. ***************
  892. *** 443,449 ****
  893.       if (fp = fopen ("/etc/systemid", "r")) {
  894.       if (fgets (name, len, fp)) {
  895.           if (cp = index (name, '\n'))
  896. !         *cp = NULL;
  897.           (void) fclose (fp);
  898.           return OK;
  899.       }
  900. --- 454,460 ----
  901.       if (fp = fopen ("/etc/systemid", "r")) {
  902.       if (fgets (name, len, fp)) {
  903.           if (cp = index (name, '\n'))
  904. !         *cp = 0;
  905.           (void) fclose (fp);
  906.           return OK;
  907.       }
  908. ***************
  909. *** 453,477 ****
  910.   
  911.       return OK;
  912.   }
  913. ! #endif    ALTOS
  914.   
  915.   /*   */
  916.   
  917. ! static char username[BUFSIZ] = "";
  918. ! static char fullname[BUFSIZ] = "";
  919.   
  920.   
  921.   char   *getusr () {
  922.       register char  *cp,
  923.                      *np;
  924.       register struct passwd *pw;
  925.   
  926.       if (username[0])
  927.       return username;
  928.   
  929.       if ((pw = getpwuid (getuid ())) == NULL
  930.           || pw -> pw_name == NULL
  931.           || *pw -> pw_name == NULL) {
  932.       (void) strcpy (username, "unknown");
  933.       (void) sprintf (fullname, "The Unknown User-ID (%d)", getuid ());
  934.       return username;
  935. --- 464,501 ----
  936.   
  937.       return OK;
  938.   }
  939. ! #endif /* ALTOS */
  940.   
  941.   /*   */
  942.   
  943. ! static char username[BUFSIZ];
  944. ! static char fullname[BUFSIZ];
  945.   
  946.   
  947.   char   *getusr () {
  948.       register char  *cp,
  949.                      *np;
  950. + #ifdef KPOP
  951. +     int uid;
  952. + #endif /* KPOP */
  953.       register struct passwd *pw;
  954.   
  955.       if (username[0])
  956.       return username;
  957.   
  958. + #ifndef KPOP
  959.       if ((pw = getpwuid (getuid ())) == NULL
  960.           || pw -> pw_name == NULL
  961.           || *pw -> pw_name == NULL) {
  962. + #else /* KPOP */
  963. +     uid = getuid ();
  964. +     if (uid == geteuid () && (cp = getenv ("USER")) != NULL
  965. +     && (pw = getpwnam (cp)) != NULL)
  966. +       strcpy (username, cp);
  967. +     else if ((pw = getpwuid (uid)) == NULL
  968. +          || pw -> pw_name == NULL
  969. +          || *pw -> pw_name == '\0') {
  970. + #endif /* KPOP */
  971.       (void) strcpy (username, "unknown");
  972.       (void) sprintf (fullname, "The Unknown User-ID (%d)", getuid ());
  973.       return username;
  974. ***************
  975. *** 480,494 ****
  976.       np = pw -> pw_gecos;
  977.       for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
  978.       continue;
  979. !     *cp = NULL;
  980.       if (MMailids) {
  981.       if (*np)
  982.           np++;
  983.       for (cp = username; *np && *np != '>'; *cp++ = *np++)
  984.           continue;
  985. !     *cp = NULL;
  986.       }
  987. !     if (MMailids == 0 || *np == NULL)
  988.       (void) strcpy (username, pw -> pw_name);
  989.   
  990.       if ((cp = getenv ("SIGNATURE")) && *cp)
  991. --- 504,518 ----
  992.       np = pw -> pw_gecos;
  993.       for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
  994.       continue;
  995. !     *cp = '\0';
  996.       if (MMailids) {
  997.       if (*np)
  998.           np++;
  999.       for (cp = username; *np && *np != '>'; *cp++ = *np++)
  1000.           continue;
  1001. !     *cp = '\0';
  1002.       }
  1003. !     if (MMailids == 0 || *np == '\0')
  1004.       (void) strcpy (username, pw -> pw_name);
  1005.   
  1006.       if ((cp = getenv ("SIGNATURE")) && *cp)
  1007. ***************
  1008. *** 504,510 ****
  1009.   
  1010.   
  1011.   char   *getfullname () {
  1012. !     if (username[0] == NULL)
  1013.       (void) getusr ();
  1014.   
  1015.       return fullname;
  1016. --- 528,534 ----
  1017.   
  1018.   
  1019.   char   *getfullname () {
  1020. !     if (username[0] == '\0')
  1021.       (void) getusr ();
  1022.   
  1023.       return fullname;
  1024. ***************
  1025. *** 537,543 ****
  1026.       return NOTOK;
  1027.   }
  1028.   
  1029. ! #else    notdef
  1030.   int     dup2 (d1, d2)
  1031.   register int    d1,
  1032.                   d2;
  1033. --- 561,567 ----
  1034.       return NOTOK;
  1035.   }
  1036.   
  1037. ! #else /* notdef */
  1038.   int     dup2 (d1, d2)
  1039.   register int    d1,
  1040.                   d2;
  1041. ***************
  1042. *** 569,573 ****
  1043.       errno = eindex;
  1044.       return i;
  1045.   }
  1046. ! #endif    notdef
  1047. ! #endif    SYS5
  1048. --- 593,597 ----
  1049.       errno = eindex;
  1050.       return i;
  1051.   }
  1052. ! #endif /* notdef */
  1053. ! #endif /* SYS5 */
  1054. *** ../mh-6.7.2/conf/doc/ADMIN.rf    Mon Jan  7 16:14:25 1991
  1055. --- conf/doc/ADMIN.rf    Wed Oct 28 08:51:22 1992
  1056. ***************
  1057. *** 1,3 ****
  1058.   .\"    @(MHWARNING)
  1059. ! .\" @(#)$Id: ADMIN.rf,v 2.13 91/01/07 16:14:24 mh Exp $
  1060.   .po +.75i
  1061. --- 1,3 ----
  1062.   .\"    @(MHWARNING)
  1063. ! .\" @(#)$Id: ADMIN.rf,v 2.16 1992/05/19 21:48:37 jromine Exp $
  1064.   .po +.75i
  1065. ***************
  1066. *** 177,179 ****
  1067.   .ti .25i
  1068. ! .b "\\$1"
  1069.   .sp
  1070. --- 177,179 ----
  1071.   .ti .25i
  1072. ! .b "\\s-2\\$1\\s0"
  1073.   .sp
  1074. ***************
  1075. *** 500,502 ****
  1076.   For historical reasons, many sites are using port \*(lq109\*(rq
  1077. ! which is the port assigned to the \*(lqPOP\*(rq (ver. 1) protocol.
  1078.   The configuration option \*(lqPOPSERVICE\*(rq is the name of the
  1079. --- 500,502 ----
  1080.   For historical reasons, many sites are using port \*(lq109\*(rq
  1081. ! which is the port assigned to the \*(lqPOP\*(rq (version 1 and 2) protocol.
  1082.   The configuration option \*(lqPOPSERVICE\*(rq is the name of the
  1083. ***************
  1084. *** 587,594 ****
  1085.   .pp
  1086. ! These two different philosophies are compatible on the same POP service host:
  1087. ! to selectively disable RPOP for hosts which aren't trusted,
  1088. ! either modify the \fI\&.rhosts\fR file in the case of POP subscribers being
  1089. ! UNIX logins,
  1090. ! or zero the contents of network address field of the \fIpop\fR\0(5) file for
  1091. ! the desired POP subscribers.
  1092.   .if t \{
  1093. --- 587,631 ----
  1094.   .pp
  1095. ! Authentication for POP subscribers differs
  1096. ! depending on the two methods.
  1097. ! When the user supplies a password for the POP session:
  1098. ! under the first method,
  1099. ! the contents of the password field for the user's entry in the
  1100. ! \fIpasswd\fR\0(5) is consulted;
  1101. ! under the second method,
  1102. ! the contents of the password field for the subscriber's entry in the
  1103. ! \fIpop\fR\0(5) file is consulted.
  1104. ! (To set this field, the \fIpopwrd\fR\0(8) program is used.)
  1105. ! .pp
  1106. ! If you are allowing RPOP,
  1107. ! under the first method,
  1108. ! the user's \fI\&.rhosts\fR file is consulted;
  1109. ! under the second method,
  1110. ! the contents of the network address field for the subscriber's entry
  1111. ! in the \fIpop\fR\0(5) file is consulted.
  1112. ! .pp
  1113. ! In addition,
  1114. ! a third authentication scheme is available.
  1115. ! When the APOP configuration option is given,
  1116. ! e.g.,
  1117. ! .sp
  1118. ! .ti +.5i
  1119. ! options    APOP='\*(lq/etc/pop.auth\*(rq'
  1120. ! .sp
  1121. ! In this case,
  1122. ! the server also allows a client to supply authentication
  1123. ! credentials to provide for origin authentication and reply protection,
  1124. ! but which do not involve sending a password in the clear over the network.
  1125. ! A POP authorization DB,
  1126. ! having as its name the value of APOP configuration option,
  1127. ! is used to keep track of this information.
  1128. ! This file is created and manipulated by the \fIpopauth\fR\0(8) program.
  1129. ! Because this file contains secret information,
  1130. ! it must be protected mode 0600 and owned by the super-user.
  1131. ! Hence,
  1132. ! your first step after installing the software is to issue
  1133. ! .sp
  1134. ! .ti +.5i
  1135. ! # popauth -init
  1136. ! .sp
  1137. ! which creates and initalizes the POP authorization DB.
  1138.   .if t \{
  1139. ***************
  1140. *** 602,603 ****
  1141. --- 639,641 ----
  1142.   .so popaka.me
  1143. + .so popauth.me
  1144.   .so popd.me
  1145. *** ../mh-6.7.2/conf/doc/MH.rf    Wed Jan 29 14:51:23 1992
  1146. --- conf/doc/MH.rf    Wed Dec  2 11:03:24 1992
  1147. ***************
  1148. *** 1,3 ****
  1149.   .\"    @(MHWARNING)
  1150. ! .\" @(#)$Id: MH.rf,v 1.15 1991/01/25 15:49:34 mh Exp jromine $
  1151.   .po +.75i
  1152. --- 1,3 ----
  1153.   .\"    @(MHWARNING)
  1154. ! .\" @(#)$Id: MH.rf,v 1.26 1992/12/02 19:03:15 jromine Exp $
  1155.   .po +.75i
  1156. ***************
  1157. *** 768,769 ****
  1158. --- 768,770 ----
  1159.   ^Editor:\0/usr/ucb/ex~^\fIcomp, dist, forw, repl\fR
  1160. + ^Inbox:\0inbox~^\fIinc, rmf\fR
  1161.   ^Msg\-Protect:\0644~^\fIinc\fR
  1162. ***************
  1163. *** 978,980 ****
  1164.   .ti -.25i
  1165. ! .b "\\$1"
  1166.   .sp
  1167. --- 979,981 ----
  1168.   .ti -.25i
  1169. ! .b "\\s-2\\$1\\s0"
  1170.   .sp
  1171. ***************
  1172. *** 1069,1071 ****
  1173.   .so dist.me
  1174. - .so fmtdump.me
  1175.   .so folder.me
  1176. --- 1070,1071 ----
  1177. ***************
  1178. *** 1076,1078 ****
  1179. --- 1076,1082 ----
  1180.   .so mhmail.me
  1181. + @BEGIN: MIME
  1182. + .so mhn.me
  1183. + @END: MIME
  1184.   .so mhook.me
  1185. + .so mhparam.me
  1186.   .so mhpath.me
  1187. ***************
  1188. *** 1083,1084 ****
  1189. --- 1087,1091 ----
  1190.   .so pick.me
  1191. + @BEGIN: MPOP
  1192. + .so popi.me
  1193. + @END: MPOP
  1194.   .so prev.me
  1195. ***************
  1196. *** 1093,1094 ****
  1197. --- 1100,1102 ----
  1198.   .so show.me
  1199. + .so slocal.me
  1200.   .so sortm.me
  1201. ***************
  1202. *** 1129,1132 ****
  1203.   .so dp.me
  1204. - .so install-mh.me
  1205.   .so fmtdump.me
  1206.   .so post.me
  1207. --- 1137,1140 ----
  1208.   .so dp.me
  1209.   .so fmtdump.me
  1210. + .so install-mh.me
  1211.   .so post.me
  1212. ***************
  1213. *** 1337,1339 ****
  1214.   Otherwise, \fIprivate\fR sequences are created.
  1215. ! This can be overridden with the `\-public' and `\-private' switches.
  1216.   .UH "Sequence Negation"
  1217. --- 1345,1347 ----
  1218.   Otherwise, \fIprivate\fR sequences are created.
  1219. ! This can be overridden with the `\-public' and `\-nopublic' switches.
  1220.   .UH "Sequence Negation"
  1221. ***************
  1222. *** 2089,2093 ****
  1223.   1.  If you can FTP to the ARPA Internet, use anonymous FTP to
  1224. ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.7.tar.Z.
  1225.   This is a tar image after being run through the compress program
  1226. ! (approximately 1.5MB).  There should also be a \fBREADME\fR file in
  1227.   that directory which tells what the current release of \fIMH\fP
  1228. --- 2097,2101 ----
  1229.   1.  If you can FTP to the ARPA Internet, use anonymous FTP to
  1230. ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z.
  1231.   This is a tar image after being run through the compress program
  1232. ! (approximately 1.8MB).  There should also be a \fBREADME\fR file in
  1233.   that directory which tells what the current release of \fIMH\fP
  1234. ***************
  1235. *** 2096,2098 ****
  1236.   This tar file is also available on louie.udel.edu 
  1237. ! [128.175.1.3] in portal/mh-6.7.tar.Z.  You may also find MH on
  1238.   various other hosts; to make sure you get the latest version and
  1239. --- 2104,2106 ----
  1240.   This tar file is also available on louie.udel.edu 
  1241. ! [128.175.1.3] in portal/mh-6.8.tar.Z.  You may also find MH on
  1242.   various other hosts; to make sure you get the latest version and
  1243. *** ../mh-6.7.2/conf/doc/ali.rf    Thu Apr  5 16:04:34 1990
  1244. --- conf/doc/ali.rf    Mon Feb 10 16:48:04 1992
  1245. ***************
  1246. *** 1,3 ****
  1247.   .\"    @(MHWARNING)
  1248. ! .\" @(#)$Id: ali.rf,v 1.6 90/04/05 15:09:39 sources Exp $
  1249.   .SC ALI 1
  1250. --- 1,3 ----
  1251.   .\"    @(MHWARNING)
  1252. ! .\" @(#)$Id: ali.rf,v 1.7 1992/02/11 00:47:53 jromine Exp $
  1253.   .SC ALI 1
  1254. ***************
  1255. *** 29,31 ****
  1256.   
  1257. ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
  1258.   additional alias files given by the `\-alias aliasfile' switch will be read.
  1259. --- 29,31 ----
  1260.   
  1261. ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
  1262.   additional alias files given by the `\-alias aliasfile' switch will be read.
  1263. *** ../mh-6.7.2/conf/doc/ap.rf    Thu Apr  5 16:04:38 1990
  1264. --- conf/doc/ap.rf    Tue May 12 15:23:59 1992
  1265. ***************
  1266. *** 1,3 ****
  1267.   .\"    @(MHWARNING)
  1268. ! .\" @(#)$Id: ap.rf,v 1.6 90/04/05 15:10:21 sources Exp $
  1269.   .SC AP 8
  1270. --- 1,3 ----
  1271.   .\"    @(MHWARNING)
  1272. ! .\" @(#)$Id: ap.rf,v 1.7 1992/05/12 22:23:34 jromine Exp $
  1273.   .SC AP 8
  1274. ***************
  1275. *** 4,6 ****
  1276.   .NA
  1277. ! ap \- parse addresses 822\-style
  1278.   .SY
  1279. --- 4,6 ----
  1280.   .NA
  1281. ! ap \- parse addresses 822-style
  1282.   .SY
  1283. *** ../mh-6.7.2/conf/doc/bbc.rf    Thu Apr  5 16:04:23 1990
  1284. --- conf/doc/bbc.rf    Wed Feb  5 13:00:43 1992
  1285. ***************
  1286. *** 1,3 ****
  1287.   .\"    @(MHWARNING)
  1288. ! .\" @(#)$Id: bbc.rf,v 2.4 90/04/05 15:07:52 sources Exp $
  1289.   .SC BBC 1
  1290. --- 1,3 ----
  1291.   .\"    @(MHWARNING)
  1292. ! .\" @(#)$Id: bbc.rf,v 2.5 1992/02/05 21:00:33 jromine Exp $
  1293.   .SC BBC 1
  1294. ***************
  1295. *** 132,135 ****
  1296.   
  1297.   The `\-rcfile\ rcfile' switch overrides the use of \fI\&.bbrc\fR for
  1298. ! user\-specific BBoards information.
  1299.   If the value given to the switch is not absolute,
  1300. --- 132,138 ----
  1301.   
  1302. + The \fI\&.bbrc\fR file in the 
  1303. + user's \fB$HOME\fR directory
  1304. + is used to keep track of what messages have been read.
  1305.   The `\-rcfile\ rcfile' switch overrides the use of \fI\&.bbrc\fR for
  1306. ! this purpose.
  1307.   If the value given to the switch is not absolute,
  1308. ***************
  1309. *** 140,143 ****
  1310.   and honors it similarly.
  1311. - If this envariable is not set,
  1312. - then the file \fI\&.bbrc\fR in the user's \fB$HOME\fR directory is used.
  1313.   .Fi
  1314. --- 143,144 ----
  1315. ***************
  1316. *** 144,146 ****
  1317.   ^$HOME/\&.mh\(ruprofile~^The user profile
  1318. ! ^$HOME/\&.bbrc~^BBoard information
  1319.   .Pr
  1320. --- 145,147 ----
  1321.   ^$HOME/\&.mh\(ruprofile~^The user profile
  1322. ! ^$HOME/\&.bbrc~^BBoard \*(lqcurrent\*(rq message information
  1323.   .Pr
  1324. *** ../mh-6.7.2/conf/doc/bbleader.rf    Thu Apr  5 16:04:44 1990
  1325. --- conf/doc/bbleader.rf    Tue May 12 15:23:54 1992
  1326. ***************
  1327. *** 1,3 ****
  1328.   .\"    @(MHWARNING)
  1329. ! .\" @(#)$Id: bbleader.rf,v 1.5 90/04/05 15:11:34 sources Exp $
  1330.   .SC BBLEADER 1
  1331. --- 1,3 ----
  1332.   .\"    @(MHWARNING)
  1333. ! .\" @(#)$Id: bbleader.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
  1334.   .SC BBLEADER 1
  1335. ***************
  1336. *** 4,6 ****
  1337.   .NA
  1338. ! BBleader \- responsiblities of a BBoard\-leader
  1339.   .SY
  1340. --- 4,6 ----
  1341.   .NA
  1342. ! BBleader \- responsiblities of an MH BBoard-leader
  1343.   .SY
  1344. *** ../mh-6.7.2/conf/doc/comp.rf    Mon Dec 17 16:29:37 1990
  1345. --- conf/doc/comp.rf    Tue Sep 15 09:58:11 1992
  1346. ***************
  1347. *** 1,3 ****
  1348.   .\"    @(MHWARNING)
  1349. ! .\" @(#)$Id: comp.rf,v 1.6 90/12/17 16:29:30 mh Exp $
  1350.   .SC COMP 1
  1351. --- 1,3 ----
  1352.   .\"    @(MHWARNING)
  1353. ! .\" @(#)$Id: comp.rf,v 1.6 1990/12/17 16:29:30 mh Exp $
  1354.   .SC COMP 1
  1355. *** ../mh-6.7.2/conf/doc/dp.rf    Thu Apr  5 16:04:30 1990
  1356. --- conf/doc/dp.rf    Tue May 12 15:24:00 1992
  1357. ***************
  1358. *** 1,3 ****
  1359.   .\"    @(MHWARNING)
  1360. ! .\" @(#)$Id: dp.rf,v 1.6 90/04/05 15:08:58 sources Exp $
  1361.   .SC DP 8
  1362. --- 1,3 ----
  1363.   .\"    @(MHWARNING)
  1364. ! .\" @(#)$Id: dp.rf,v 1.7 1992/05/12 22:23:34 jromine Exp $
  1365.   .SC DP 8
  1366. ***************
  1367. *** 4,6 ****
  1368.   .NA
  1369. ! dp \- parse dates 822\-style
  1370.   .SY
  1371. --- 4,6 ----
  1372.   .NA
  1373. ! dp \- parse dates 822-style
  1374.   .SY
  1375. *** ../mh-6.7.2/conf/doc/fmtdump.rf    Fri Jan 25 15:47:32 1991
  1376. --- conf/doc/fmtdump.rf    Wed Dec  2 13:48:51 1992
  1377. ***************
  1378. *** 1,3 ****
  1379.   .\"    @(MHWARNING)
  1380. ! .\" @(#)$Id: fmtdump.rf,v 1.2 91/01/25 15:47:30 mh Exp $
  1381.   .SC FMTDUMP 8
  1382. --- 1,3 ----
  1383.   .\"    @(MHWARNING)
  1384. ! .\" @(#)$Id: fmtdump.rf,v 1.6 1992/12/02 21:38:37 jromine Exp $
  1385.   .SC FMTDUMP 8
  1386. ***************
  1387. *** 4,8 ****
  1388.   .NA
  1389. ! fmtdump \- decode \fIMH\fP format files
  1390.   .SY
  1391. ! @(MHETCPATH)/fmtdump formatfile
  1392.   .DE
  1393. --- 4,11 ----
  1394.   .NA
  1395. ! fmtdump \- decode MH format files
  1396.   .SY
  1397. ! @(MHETCPATH)/fmtdump
  1398. ! \%[\-form\ formatfile]
  1399. ! \%[\-format\ string]
  1400. ! \%[\-help]
  1401.   .DE
  1402. ***************
  1403. *** 11,14 ****
  1404.   interprets the file.
  1405.   .Sa
  1406. ! mh-format(8), mh-sequences(8)
  1407.   .Co
  1408. --- 14,27 ----
  1409.   interprets the file.
  1410. + The `\-format\ string' and `\-form\ formatfile' switches may be used
  1411. + to specify a format string or format file to read.
  1412. + The string is simply a format string and the file is simply a format file.
  1413. + See \fImh-format\fR\|(5) for the details.
  1414. + .Fi
  1415. + ^$HOME/\&.mh\(ruprofile~^The user profile
  1416. + ^@(MHETCPATH)/scan.default~^The default format file
  1417. + .Pr
  1418. + ^Path:~^To determine the user's MH directory
  1419.   .Sa
  1420. ! mh-format(5), mh-sequences(8)
  1421.   .Co
  1422. *** ../mh-6.7.2/conf/doc/folder.rf    Tue Dec 18 14:28:15 1990
  1423. --- conf/doc/folder.rf    Thu Oct 29 13:50:31 1992
  1424. ***************
  1425. *** 1,3 ****
  1426.   .\"    @(MHWARNING)
  1427. ! .\" @(#)$Id: folder.rf,v 1.6 90/12/18 14:28:05 mh Exp $
  1428.   .SC FOLDER 1
  1429. --- 1,3 ----
  1430.   .\"    @(MHWARNING)
  1431. ! .\" @(#)$Id: folder.rf,v 1.11 1992/10/29 21:50:27 jromine Exp $
  1432.   .SC FOLDER 1
  1433. ***************
  1434. *** 9,10 ****
  1435. --- 9,12 ----
  1436.   \%[\-all]
  1437. + \%[\-print]
  1438. + .\" \%[\-noprint]
  1439.   \%[\-fast] \%[\-nofast]
  1440. ***************
  1441. *** 11,13 ****
  1442.   \%[\-header] \%[\-noheader]
  1443. - \%[\-pack] \%[\-nopack]
  1444.   \%[\-recurse] \%[\-norecurse]
  1445. --- 13,14 ----
  1446. ***************
  1447. *** 14,16 ****
  1448.   \%[\-total] \%[\-nototal]
  1449. - \%[\-print] \%[\-noprint]
  1450.   \%[\-list] \%[\-nolist]
  1451. --- 15,16 ----
  1452. ***************
  1453. *** 17,18 ****
  1454. --- 17,20 ----
  1455.   \%[\-push] \%[\-pop]
  1456. + \%[\-pack] \%[\-nopack]
  1457. + \%[\-verbose] \%[\-noverbose]
  1458.   \%[\-help]
  1459. ***************
  1460. *** 24,35 ****
  1461.   track of the current folder from day to day.
  1462.   When \fIfolder\fR is given the `\-print' switch (the default),
  1463. ! the current folder and/or message may be set,
  1464. ! or all folders may be listed.
  1465. ! When a `+folder' argument is given,
  1466. ! this corresponds to a \*(lqcd\*(rq operation in the \fICShell\fR;
  1467. ! when no `+folder' argument is given,
  1468. ! this corresponds roughly to a \*(lqpwd\*(rq operation in the \fICShell\fR.
  1469. ! \fIFolder\fR will
  1470.   list the current folder, the number of messages in it, the
  1471. --- 26,29 ----
  1472.   track of the current folder from day to day.
  1473.   When \fIfolder\fR is given the `\-print' switch (the default),
  1474. ! \fIfolder\fR will
  1475.   list the current folder, the number of messages in it, the
  1476. ***************
  1477. *** 37,39 ****
  1478.   the folder, and will flag extra files if they exist.
  1479. ! An example of the output is:
  1480.   
  1481. --- 31,33 ----
  1482.   the folder, and will flag extra files if they exist.
  1483. ! An example of this summary is:
  1484.   
  1485. ***************
  1486. *** 49,54 ****
  1487.   become the current folder and/or message.
  1488.   Specifying `\-all'
  1489. ! will produce a line for each folder in the user's MH directory,
  1490. ! sorted alphabetically.
  1491. ! These folders are preceded by the read\-only folders,
  1492.   which occur as \*(lqatr\-cur\-\*(rq entries in the user's \fIMH\fR context.
  1493. --- 43,72 ----
  1494.   become the current folder and/or message.
  1495. + If the specified (or default) folder doesn't exist,
  1496. + the user will be queried as to whether the folder should be created.
  1497. + When standard input is not a tty, the folder is
  1498. + created without any query.
  1499. + (This is the easy way to create an empty folder for use later.)
  1500. + By comparison,
  1501. + when a `+folder' argument is given,
  1502. + this corresponds to a \*(lqcd\*(rq operation in the \fIshell\fR;
  1503. + when no `+folder' argument is given,
  1504. + this corresponds roughly to a \*(lqpwd\*(rq operation in the \fIshell\fR.
  1505. + .\" note - this doesn't work at present
  1506. + .\" If `\-noprint' is specified, 
  1507. + .\" a `+folder' and/or `msg' may still be specified
  1508. + .\" to set the current folder and/or message,
  1509. + .\" but the folder summary will not be printed.
  1510. + .Uh "Multiple Folders"
  1511.   Specifying `\-all'
  1512. ! will produce a summary line for each top-level
  1513. ! folder in the user's MH directory, sorted alphabetically.
  1514. ! (If \fIfolder\fR
  1515. ! is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR\0),
  1516. ! `\-all' is assumed).
  1517. ! Specifying `\-recurse' with `\-all' will also 
  1518. ! produce a line for all sub-folders.
  1519. ! These folders are all preceded by the read\-only folders,
  1520.   which occur as \*(lqatr\-cur\-\*(rq entries in the user's \fIMH\fR context.
  1521. ***************
  1522. *** 56,57 ****
  1523. --- 74,76 ----
  1524.   
  1525. + .ne 9
  1526.   .nf
  1527. ***************
  1528. *** 79,85 ****
  1529.   
  1530. ! The header is output if either an `\-all' or a `\-header' switch
  1531.   is specified; it is suppressed by `\-noheader'.
  1532. - Also, if \fIfolder\fR
  1533. - is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR\0),
  1534. - `\-all' is assumed.
  1535.   A `\-total' switch will produce only the
  1536. --- 98,101 ----
  1537.   
  1538. ! The header is output if either a `\-all' or a `\-header' switch
  1539.   is specified; it is suppressed by `\-noheader'.
  1540.   A `\-total' switch will produce only the
  1541. ***************
  1542. *** 87,94 ****
  1543.   
  1544. - If a `+folder' and/or `msg' is given along with the `\-all' switch,
  1545. - \fIfolder\fR will,
  1546. - in addition to setting the current folder and/or message,
  1547. - list the top\-level folders for the current folder (with `\-norecurse')
  1548. - or list all folders under the current folder recursively (with `\-recurse').
  1549.   If `\-fast' is given, only the folder name (or names in the
  1550. --- 103,104 ----
  1551. ***************
  1552. *** 98,104 ****
  1553.   
  1554. ! The `\-pack' switch will compress the message names in a folder, removing
  1555. ! holes in message numbering.
  1556.   
  1557. ! The `\-recurse' switch will list each folder recursively.
  1558. ! Use of this option effectively defeats the speed enhancement of the `\-fast'
  1559.   option,
  1560. --- 108,120 ----
  1561.   
  1562. ! If a `+folder' 
  1563. ! is given along with the `\-all' switch,
  1564. ! \fIfolder\fR will,
  1565. ! in addition to setting the current folder,
  1566. ! list the top\-level folders for the current folder (with `\-norecurse')
  1567. ! or list all sub-folders under the current folder recursively (with `\-recurse').
  1568. ! In this case, if a `msg' is also supplied,
  1569. ! it will become the current message of `+folder'.
  1570.   
  1571. ! The `\-recurse' switch lists each folder recursively, so
  1572. ! use of this option effectively defeats the speed enhancement of the `\-fast'
  1573.   option,
  1574. ***************
  1575. *** 107,114 ****
  1576.   
  1577. ! If the specified (or default) folder doesn't exist,
  1578. ! the user will be queried as to whether the folder should be created.
  1579. ! When standard input is not a tty, the folder is
  1580. ! created without any query.
  1581. ! (This is the easy way to create an empty folder for use later.)
  1582.   
  1583.   The `\-push' switch directs \fIfolder\fR to push the current folder onto the
  1584. --- 123,131 ----
  1585.   
  1586. ! .Uh "Compacting a Folder"
  1587. ! The `\-pack' switch will compress the message names in the
  1588. ! designated folders, removing holes in message numbering.
  1589. ! The `\-verbose' switch directs \fIfolder\fR to tell the user the general
  1590. ! actions that it is taking to compress the folder.
  1591.   
  1592. + .Uh "The Folder Stack"
  1593.   The `\-push' switch directs \fIfolder\fR to push the current folder onto the
  1594. ***************
  1595. *** 127,129 ****
  1596.   the last occurrence of either one overrides any previous occurrence of the
  1597. ! other.
  1598.   
  1599. --- 144,146 ----
  1600.   the last occurrence of either one overrides any previous occurrence of the
  1601. ! other.  Both of these switches also set `\-list' by default.
  1602.   
  1603. ***************
  1604. *** 132,135 ****
  1605.   No `+folder' argument is allowed.
  1606. ! After a successful `\-push' or `\-pop', the `\-list' action is taken.
  1607.   This corresponds to the \*(lqdirs\*(rq operation in the \fICShell\fR.
  1608.   .Fi
  1609. --- 149,155 ----
  1610.   No `+folder' argument is allowed.
  1611. ! After a successful `\-push' or `\-pop', the `\-list' action is taken,
  1612. ! unless a `\-nolist' switch follows them on the command line.
  1613.   This corresponds to the \*(lqdirs\*(rq operation in the \fICShell\fR.
  1614. + The `\-push', `\-pop', and `\-list' switches turn
  1615. + off `\-print'.
  1616.   .Fi
  1617. ***************
  1618. *** 144,147 ****
  1619.   ^Folder\-Stack:~^To determine the folder stack
  1620. ! .Ps
  1621. ! ^lsproc:~^Program to list the contents of a folder
  1622.   .Sa
  1623. --- 164,167 ----
  1624.   ^Folder\-Stack:~^To determine the folder stack
  1625. ! .\" .Ps
  1626. ! .\" ^lsproc:~^Program to list the contents of a folder
  1627.   .Sa
  1628. ***************
  1629. *** 163,165 ****
  1630. --- 183,189 ----
  1631.   .Ds
  1632. + `\-noverbose'
  1633. + .Ds
  1634.   `\-print' is the default if no `\-list', `\-push', or `\-pop' is specified
  1635. + .Ds
  1636. + `\-list' is the default if `\-push', or `\-pop' is specified
  1637.   .Co
  1638. ***************
  1639. *** 173,174 ****
  1640. --- 197,200 ----
  1641.   then \fIfolder\fR will always change the current folder to that.
  1642. + .Bu
  1643. + `\-all' forces `\-header'.
  1644.   .En
  1645. *** ../mh-6.7.2/conf/doc/forw.rf    Tue Dec 18 14:40:13 1990
  1646. --- conf/doc/forw.rf    Fri Oct 16 14:36:07 1992
  1647. ***************
  1648. *** 1,3 ****
  1649.   .\"    @(MHWARNING)
  1650. ! .\" @(#)$Id: forw.rf,v 1.10 90/12/18 14:40:06 mh Exp $
  1651.   .SC FORW 1
  1652. --- 1,3 ----
  1653.   .\"    @(MHWARNING)
  1654. ! .\" @(#)$Id: forw.rf,v 1.11 1992/10/16 21:36:02 jromine Exp $
  1655.   .SC FORW 1
  1656. ***************
  1657. *** 15,16 ****
  1658. --- 15,19 ----
  1659.   \%[\-inplace] \%[\-noinplace]
  1660. + @BEGIN: MIME
  1661. + \%[\-mime] \%[\-nomime]
  1662. + @END: MIME
  1663.   \%[\-whatnowproc\ program] \%[\-nowhatnowproc]
  1664. ***************
  1665. *** 121,122 ****
  1666. --- 124,182 ----
  1667.   
  1668. + @BEGIN: MIME
  1669. + To use the MIME rules for encapsulation,
  1670. + specify the `\-mime' switch.
  1671. + This directs \fIforw\fR to generate an \fImhn\fR composition file.
  1672. + Note that MH will not invoke \fImhn\fR automatically,
  1673. + unless you  add this line to your \&.mh\(ruprofile file:
  1674. + .sp
  1675. + .in +.5i
  1676. + automhnproc: mhn
  1677. + .in -.5i
  1678. + .sp
  1679. + Otherwise,
  1680. + you must specifically give the command
  1681. + .sp
  1682. + .in +.5i
  1683. + What now? edit mhn
  1684. + .in -.5i
  1685. + .sp
  1686. + prior to sending the draft.
  1687. + To automate this somewhat,
  1688. + create a link to \fIprompter\fR called \fIrapid\fR
  1689. + and put these lines in your \&.mh\(ruprofile file:
  1690. + .sp
  1691. + .in +.5i
  1692. + .nf
  1693. + forw: -editor rapid -mime
  1694. + rapid: -rapid
  1695. + rapid-next: mhn
  1696. + .fi
  1697. + .in -.5i
  1698. + .sp
  1699. + Then,
  1700. + you can simply do:
  1701. + .sp
  1702. + .in +.5i
  1703. + .nf
  1704. + \fIforw msgs\fR
  1705. + To: \fImailbox\fR
  1706. + cc:
  1707. + Subject: \fIwhatever\fR
  1708. + --------Enter initial text
  1709. + \fIblah, blah, blah.\fR
  1710. + <CTRL-D>
  1711. + --------
  1712. + What now? \fIedit\fR
  1713. + What now? \fIsend\fR
  1714. + ...
  1715. + .fi
  1716. + .in -.5i
  1717. + .sp
  1718. + The \fIedit\fR command invokes \fImhn\fR automatically.
  1719. + @END: MIME
  1720.   The `\-draftfolder\ +folder' and `\-draftmessage\ msg' switches invoke the
  1721. ***************
  1722. *** 191,192 ****
  1723. --- 251,256 ----
  1724.   `\-noinplace'
  1725. + @BEGIN: MIME
  1726. + .Ds
  1727. + `\-nomime'
  1728. + @END: MIME
  1729.   .Co
  1730. *** ../mh-6.7.2/conf/doc/inc.rf    Mon Apr  9 20:22:46 1990
  1731. --- conf/doc/inc.rf    Wed May 20 09:24:26 1992
  1732. ***************
  1733. *** 1,3 ****
  1734.   .\"    @(MHWARNING)
  1735. ! .\" @(#)$Id: inc.rf,v 1.6 90/04/09 20:22:39 sources Exp $
  1736.   .SC INC 1
  1737. --- 1,3 ----
  1738.   .\"    @(MHWARNING)
  1739. ! .\" @(#)$Id: inc.rf,v 1.8 1992/02/04 21:41:21 jromine Exp $
  1740.   .SC INC 1
  1741. ***************
  1742. *** 24,27 ****
  1743.   \%[\-host\ host] \%[\-user\ user]
  1744. ! \%[\-pack\ file] \%[\-nopack]
  1745.   \%[\-rpop] \%[\-norpop]
  1746.   @END: POP
  1747. --- 24,28 ----
  1748.   \%[\-host\ host] \%[\-user\ user]
  1749. ! \%[\-apop] \%[\-noapop]
  1750.   \%[\-rpop] \%[\-norpop]
  1751. + \%[\-pack\ file] \%[\-nopack]
  1752.   @END: POP
  1753. ***************
  1754. *** 32,34 ****
  1755.   If `+folder' isn't specified,
  1756. ! the folder named \*(lqinbox\*(rq in the user's \fIMH\fR directory will be used.
  1757.   The
  1758. --- 33,37 ----
  1759.   If `+folder' isn't specified,
  1760. ! a folder in the user's \fIMH\fR directory will be used, either that
  1761. ! specified by the \*(lqInbox:\*(rq entry in the user's profile, or
  1762. ! the folder named \*(lqinbox\*(rq.
  1763.   The
  1764. ***************
  1765. *** 124,131 ****
  1766.   waiting.
  1767. ! The `\-user\ user' switch may be given to specify the name of the POP
  1768. ! subscriber you wish to check mail for on the POP service host.
  1769. ! The `\-rpop' switch uses the UNIX \fIrPOP\fR
  1770. ! (authentication done via trusted connections).
  1771. ! In contrast, the `\-norpop' switch uses the ARPA \fIPOP\fR
  1772. ! (in which case \fIinc\fR will prompt for a password).
  1773.   
  1774. --- 127,141 ----
  1775.   waiting.
  1776. ! If the `\-user\ user' switch is not given,
  1777. ! then the current username is used.
  1778. ! Normally,
  1779. ! \fIinc\fR will prompt for a password to use.
  1780. ! However,
  1781. ! if the `\-apop' switch is given,
  1782. ! \fIinc\fR will generate authentication credentials to provide
  1783. ! for origin authentication and replay protection,
  1784. ! but which do not involve sending a password in the clear over the network.
  1785. ! Otherwise,
  1786. ! if the `\-rpop' switch is given,
  1787. ! then \fIinc\fR will try to use a \*(lqtrusted\*(rq connection
  1788. ! (ala the BSD r-commands).
  1789.   
  1790. ***************
  1791. *** 148,149 ****
  1792. --- 158,161 ----
  1793.   .Ps
  1794. + ^Inbox:~^To determine the inbox, default \*(lqinbox\*(rq
  1795. + .Ps
  1796.   ^Folder\-Protect:~^To set mode when creating a new folder
  1797. ***************
  1798. *** 160,162 ****
  1799.   .De
  1800. ! `+folder' defaults to \*(lqinbox\*(rq
  1801.   .Ds
  1802. --- 172,174 ----
  1803.   .De
  1804. ! `+folder' defaulted by \*(lqInbox\*(rq above
  1805.   .Ds
  1806. *** ../mh-6.7.2/conf/doc/install-mh.rf    Thu Apr  5 16:04:50 1990
  1807. --- conf/doc/install-mh.rf    Wed Dec  2 13:38:50 1992
  1808. ***************
  1809. *** 1,3 ****
  1810.   .\"    @(MHWARNING)
  1811. ! .\" @(#)$Id: install-mh.rf,v 1.5 90/04/05 15:12:44 sources Exp $
  1812.   .SC INSTALL-MH 8
  1813. --- 1,3 ----
  1814.   .\"    @(MHWARNING)
  1815. ! .\" @(#)$Id: install-mh.rf,v 1.6 1992/12/02 21:38:49 jromine Exp $
  1816.   .SC INSTALL-MH 8
  1817. ***************
  1818. *** 4,6 ****
  1819.   .NA
  1820. ! install\-mh \- initialize the MH environment
  1821.   .SY
  1822. --- 4,6 ----
  1823.   .NA
  1824. ! install-mh \- initialize the MH environment
  1825.   .SY
  1826. *** ../mh-6.7.2/conf/doc/maildelivery.5    Thu Oct 29 14:55:12 1987
  1827. --- conf/doc/maildelivery.5    Mon Oct 26 09:02:26 1992
  1828. ***************
  1829. *** 69,71 ****
  1830.   the address that was used to mail to you, normally 'yourname' or 
  1831. ! 'yourname=string' (see below).
  1832.   .II default
  1833. --- 69,71 ----
  1834.   the address that was used to mail to you, normally 'yourname' or 
  1835. ! \&'yourname=string' (see below).
  1836.   .II default
  1837. ***************
  1838. *** 106,108 ****
  1839.   went well. An exit status of octal 0300-0377 indicates that a permanent
  1840. ! failure occured and the message should be rejected, these error codes
  1841.   are given in mmdf.h. Any other exit
  1842. --- 106,108 ----
  1843.   went well. An exit status of octal 0300-0377 indicates that a permanent
  1844. ! failure occured and the message should be rejected; these error codes
  1845.   are given in mmdf.h. Any other exit
  1846. ***************
  1847. *** 169,171 ****
  1848.   creation mask.
  1849. ! Initgroups is called if 4.2 version of UNIX is running.
  1850.   If further requirements are needed, then a shell script
  1851. --- 169,171 ----
  1852.   creation mask.
  1853. ! Initgroups is called if the 4.2 version of UNIX is running.
  1854.   If further requirements are needed, then a shell script
  1855. ***************
  1856. *** 214,216 ****
  1857.   # if the address is jpo=ack \- send an acknowledgement copy back
  1858. ! Addr~~~~jpo=ack~~~~|~~~~R~~~~resend~~\-r~~$(reply-to)
  1859.   # anything from steve \- destroy!
  1860. --- 214,216 ----
  1861.   # if the address is jpo=ack \- send an acknowledgement copy back
  1862. ! Addr~~~~jpo=ack~~~~|~~~~R~~~~"resend~~\-r~~$(reply-to)"
  1863.   # anything from steve \- destroy!
  1864. ***************
  1865. *** 225,227 ****
  1866.   $HOME/.maildelivery
  1867. ! \- the files normal location.
  1868.   .br
  1869. --- 225,227 ----
  1870.   $HOME/.maildelivery
  1871. ! \- the file's normal location.
  1872.   .br
  1873. ***************
  1874. *** 237,240 ****
  1875.   .sp
  1876. ! This alows interfacing to non-standard mail systems,
  1877. ! ones that don't believe in delimiter-separated mailboxes
  1878.   .SH "SEE ALSO"
  1879. --- 237,240 ----
  1880.   .sp
  1881. ! This allows interfacing to non-standard mail systems,
  1882. ! ones that don't believe in delimiter-separated mailboxes.
  1883.   .SH "SEE ALSO"
  1884. *** ../mh-6.7.2/conf/doc/mark.rf    Wed Dec 26 17:03:35 1990
  1885. --- conf/doc/mark.rf    Tue Feb 11 16:23:18 1992
  1886. ***************
  1887. *** 1,3 ****
  1888.   .\"    @(MHWARNING)
  1889. ! .\" @(#)$Id: mark.rf,v 1.6 90/12/26 17:03:28 mh Exp $
  1890.   .SC MARK 1
  1891. --- 1,3 ----
  1892.   .\"    @(MHWARNING)
  1893. ! .\" @(#)$Id: mark.rf,v 1.7 1992/02/12 00:23:13 jromine Exp $
  1894.   .SC MARK 1
  1895. ***************
  1896. *** 72,76 ****
  1897.   for the folder and the messages associated with those sequences.
  1898. ! \fIMark\fR will list each sequence named via `\-sequence\ name'
  1899. ! (or all of them if `\-sequence' isn't used),
  1900. ! and the messages associated with that sequence.
  1901.   The `\-zero' switch does not affect the operation of `\-list'.
  1902. --- 72,77 ----
  1903.   for the folder and the messages associated with those sequences.
  1904. ! \fIMark\fR will list the name of each sequence given by
  1905. ! `\-sequence\ name' and the messages associated with that sequence.
  1906. ! If `\-sequence' isn't used, all sequences will be listed,
  1907. ! with private sequences being so indicated.
  1908.   The `\-zero' switch does not affect the operation of `\-list'.
  1909. ***************
  1910. *** 87,89 ****
  1911.   Only a certain number of sequences may be defined for a given folder.
  1912. ! This number is usually limited to 10.
  1913.   
  1914. --- 88,90 ----
  1915.   Only a certain number of sequences may be defined for a given folder.
  1916. ! This number is usually limited to 26 (10 on small systems).
  1917.   
  1918. ***************
  1919. *** 102,104 ****
  1920.   .Sa
  1921. ! pick (1)
  1922.   .De
  1923. --- 103,105 ----
  1924.   .Sa
  1925. ! pick (1), mh-sequence (5)
  1926.   .De
  1927. ***************
  1928. *** 115,116 ****
  1929. --- 116,121 ----
  1930.   If a folder is given, it will become the current folder.
  1931. + .Hh
  1932. + Use \*(lqpick sequence \-list\*(rq
  1933. + to enumerate the messages in a sequence (such as for use 
  1934. + by a shell script).
  1935.   .En
  1936. *** ../mh-6.7.2/conf/doc/mh-alias.rf    Thu Jan 30 11:05:17 1992
  1937. --- conf/doc/mh-alias.rf    Fri Dec 11 13:44:29 1992
  1938. ***************
  1939. *** 1,6 ****
  1940.   .\"    @(MHWARNING)
  1941. ! .\" @(#)$Id: mh-alias.rf,v 1.8 1992/01/30 19:05:13 jromine Exp $
  1942. ! .SC MH\-ALIAS 5
  1943.   .NA
  1944. ! mh\-alias \- alias file for MH message system
  1945.   .SY
  1946. --- 1,6 ----
  1947.   .\"    @(MHWARNING)
  1948. ! .\" @(#)$Id: mh-alias.rf,v 1.11 1992/12/11 21:44:16 jromine Exp $
  1949. ! .SC MH-ALIAS 5
  1950.   .NA
  1951. ! mh-alias \- alias file for MH message system
  1952.   .SY
  1953. ***************
  1954. *** 114,115 ****
  1955. --- 114,116 ----
  1956.   
  1957. + .ne 10
  1958.   \fBExample:\fR
  1959. ***************
  1960. *** 135,136 ****
  1961. --- 136,138 ----
  1962.   the three names \*(lqfrated@UCI\*(rq, \*(rqfear\*(rq, and \*(rqfreida\*(rq.
  1963. + .sp
  1964.   The alias \*(lqb-people\*(rq is a blind list which includes the
  1965. ***************
  1966. *** 139,140 ****
  1967. --- 141,143 ----
  1968.   message header will  show only \*(lqBlind List: ;\*(rq (not the addresses).
  1969. + .sp
  1970.   Next, the definition of \*(lqUNIX\-committee\*(rq is given by reading
  1971. ***************
  1972. *** 145,146 ****
  1973. --- 148,150 ----
  1974.   \fI/etc/passwd\fR is equivalent to the \*(lqwheel\*(rq group.
  1975. + .sp
  1976.   Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id in
  1977. ***************
  1978. *** 167,169 ****
  1979.   First, in your \fI\&.mh\(ruprofile\fR,
  1980. ! choose a name for your primary alias file, say \*(lqaliases\*(rq,
  1981.   and add the line:
  1982. --- 171,173 ----
  1983.   First, in your \fI\&.mh\(ruprofile\fR,
  1984. ! choose a name for your alias file, say \*(lqaliases\*(rq,
  1985.   and add the line:
  1986. ***************
  1987. *** 220,222 ****
  1988.   .Bu
  1989. ! Although the forward\-referencing semantics of \fImh\-alias\fR files prevent
  1990.   recursion, the \*(lq<\ alias\-file\*(rq command may defeat this.  Since the
  1991. --- 224,226 ----
  1992.   .Bu
  1993. ! Although the forward-referencing semantics of \fImh\-alias\fR files prevent
  1994.   recursion, the \*(lq<\ alias\-file\*(rq command may defeat this.  Since the
  1995. ***************
  1996. *** 225,226 ****
  1997. --- 229,232 ----
  1998.   used up.
  1999. + .sp
  2000. + Forward references do not work correctly inside blind lists.
  2001.   .En
  2002. *** ../mh-6.7.2/conf/doc/mh-chart.rf    Wed Jan 29 14:50:54 1992
  2003. --- conf/doc/mh-chart.rf    Wed Nov 11 09:34:16 1992
  2004. ***************
  2005. *** 1,7 ****
  2006.   .\"    @(MHWARNING)
  2007. ! .\" @(#)$Id: mh-chart.rf,v 2.11 1992/01/29 22:50:50 jromine Exp $
  2008.   .if '\*(ZZ'-man' \{\
  2009. ! .SC MH\-CHART 1
  2010.   .NA
  2011. ! mh\-chart \- Chart of \fIMH\fR Commands
  2012.   .SY
  2013. --- 1,7 ----
  2014.   .\"    @(MHWARNING)
  2015. ! .\" @(#)$Id: mh-chart.rf,v 2.18 1992/11/11 17:34:01 jromine Exp $
  2016.   .if '\*(ZZ'-man' \{\
  2017. ! .SC MH-CHART 1
  2018.   .NA
  2019. ! mh-chart \- Chart of MH Commands
  2020.   .SY
  2021. ***************
  2022. *** 120,124 ****
  2023.   .ti .5i
  2024. ! .ne 3
  2025. ! fmtdump
  2026. ! \%[filename]
  2027.   
  2028. --- 120,126 ----
  2029.   .ti .5i
  2030. ! .ne 4
  2031. ! @(MHETCPATH)/fmtdump
  2032. ! \%[\-form\ formatfile]
  2033. ! \%[\-format\ string]
  2034. ! \%[\-help]
  2035.   
  2036. ***************
  2037. *** 153,154 ****
  2038. --- 155,159 ----
  2039.   \%[\-inplace] \%[\-noinplace]
  2040. + @BEGIN: MIME
  2041. + \%[\-mime] \%[\-nomime]
  2042. + @END: MIME
  2043.   \%[\-whatnowproc\ program] \%[\-nowhatnowproc]
  2044. ***************
  2045. *** 190,193 ****
  2046.   \%[\-host\ host] \%[\-user\ user]
  2047. ! \%[\-pack\ file] \%[\-nopack]
  2048.   \%[\-rpop] \%[\-norpop]
  2049.   @END: POP
  2050. --- 195,199 ----
  2051.   \%[\-host\ host] \%[\-user\ user]
  2052. ! \%[\-apop] \%[\-noapop]
  2053.   \%[\-rpop] \%[\-norpop]
  2054. + \%[\-pack\ file] \%[\-nopack]
  2055.   @END: POP
  2056. ***************
  2057. *** 227,228 ****
  2058. --- 233,235 ----
  2059.   \%[\-help]
  2060. + @BEGIN: MIME
  2061.   
  2062. ***************
  2063. *** 229,230 ****
  2064. --- 236,267 ----
  2065.   .ti .5i
  2066. + .ne 9
  2067. + mhn
  2068. + \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
  2069. + .br
  2070. + \%[\-list\0\%[\-header]\0\%[\-noheader]
  2071. + .br
  2072. +        \%[\-realsize]\0\%[\-norealsize]] \%[-nolist]
  2073. + .br
  2074. + \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
  2075. + .br
  2076. +        \%[\-form\0formfile]] \%[\-noshow]
  2077. + .br
  2078. + \%[\-store\0\%[\-auto]\0\%[\-noauto]] \%[\-nostore]
  2079. + .br
  2080. + \%[\-verbose] \%[\-noverbose]
  2081. + \%[\-rfc934mode] \%[\-norfc934mode]
  2082. + \%[\-ebcdic] \%[\-noebcdicsafe]
  2083. + .br
  2084. + \%[\-help]
  2085. + @END: MIME
  2086. + .ti .5i
  2087. + .ne 5
  2088. + mhparam
  2089. + \%[profile-components]
  2090. + \%[\-components] \%[\-nocomponents]
  2091. + \%[\-all]
  2092. + \%[\-help]
  2093. + .ti .5i
  2094.   .ne 3
  2095. ***************
  2096. *** 244,245 ****
  2097. --- 281,283 ----
  2098.   \%[\-host\ host] \%[\-user\ user]
  2099. + \%[\-apop] \%[\-noapop]
  2100.   \%[\-rpop] \%[\-norpop]
  2101. ***************
  2102. *** 304,305 ****
  2103. --- 342,344 ----
  2104.   .\}
  2105. + @BEGIN: MPOP
  2106.   
  2107. ***************
  2108. *** 306,307 ****
  2109. --- 345,364 ----
  2110.   .ti .5i
  2111. + .ne 11
  2112. + popi
  2113. + \%[+folder]
  2114. + \%[\-host\ host] \%[\-user\ user]
  2115. + \%[\-apop] \%[\-noapop]
  2116. + \%[\-rpop] \%[\-norpop]
  2117. + @BEGIN: BPOP
  2118. + \%[\-auto] \%[\-noauto]
  2119. + \%[\-mshproc\ program]
  2120. + @END: BPOP
  2121. + \%[\-form\ formatfile]
  2122. + \%[\-format\ string]
  2123. + \%[\-width\ columns]
  2124. + \%[\-help]
  2125. + @END: MPOP
  2126. + .ti .5i
  2127.   .ne 6
  2128. ***************
  2129. *** 403,404 ****
  2130. --- 460,464 ----
  2131.   \%[\-forward] \%[\-noforward]
  2132. + @BEGIN: MIME
  2133. + \%[\-mime] \%[\-nomime]
  2134. + @END: MIME
  2135.   \%[\-msgid] \%[\-nomsgid]
  2136. ***************
  2137. *** 405,406 ****
  2138. --- 465,469 ----
  2139.   \%[\-push] \%[\-nopush]
  2140. + @BEGIN: MIME
  2141. + \%[\-split\ seconds]
  2142. + @END: MIME
  2143.   \%[\-verbose] \%[\-noverbose]
  2144. ***************
  2145. *** 507,508 ****
  2146. --- 570,572 ----
  2147.   \%[\-compat]
  2148. + @BEGIN: APOP
  2149.   
  2150. ***************
  2151. *** 509,510 ****
  2152. --- 573,581 ----
  2153.   .ti .5i
  2154. + .ne 3
  2155. + popauth
  2156. + \%[\-init] \%[\-list] \%[\-user\ name]
  2157. + \%[\-help]
  2158. + @END: APOP
  2159. + .ti .5i
  2160.   .ne 11
  2161. ***************
  2162. *** 517,518 ****
  2163. --- 588,592 ----
  2164.   \%[\-format] \%[\-noformat]
  2165. + @BEGIN: MIME
  2166. + \%[\-mime] \%[\-nomime]
  2167. + @END: MIME
  2168.   \%[\-msgid] \%[\-nomsgid]
  2169. ***************
  2170. *** 522,523 ****
  2171. --- 596,611 ----
  2172.   file
  2173. + \%[\-help]
  2174. + .ti .5i
  2175. + .ne 10
  2176. + @(MHETCPATH)/slocal \%[address\ info\ sender]
  2177. + \%[\-addr\ address]
  2178. + \%[\-info\ data]
  2179. + \%[\-sender\ sender]
  2180. + \%[\-user\ username]
  2181. + \%[\-mailbox\ mbox]
  2182. + \%[\-file\ file]
  2183. + \%[\-maildelivery\ deliveryfile]
  2184. + \%[\-verbose] \%[\-noverbose]
  2185. + \%[\-debug]
  2186.   \%[\-help]
  2187. *** ../mh-6.7.2/conf/doc/mh-format.rf    Wed Jan 29 14:57:07 1992
  2188. --- conf/doc/mh-format.rf    Wed Dec  2 10:41:53 1992
  2189. ***************
  2190. *** 1,6 ****
  2191.   .\"    @(MHWARNING)
  2192. ! .\" @(#)$Id: mh-format.rf,v 1.30 1992/01/29 22:55:31 jromine Exp $
  2193. ! .SC MH\-FORMAT 5
  2194.   .NA
  2195. ! mh\-format \- format file for MH message system
  2196.   .SY
  2197. --- 1,6 ----
  2198.   .\"    @(MHWARNING)
  2199. ! .\" @(#)$Id: mh-format.rf,v 1.43 1992/12/02 18:41:50 jromine Exp $
  2200. ! .SC MH-FORMAT 5
  2201.   .NA
  2202. ! mh-format \- format file for MH message system
  2203.   .SY
  2204. ***************
  2205. *** 39,41 ****
  2206.   There are three types of \fIescape\fR sequences:
  2207. ! header \fIcomponents\fR, built-in \fIfunctions\fR, and, flow \fIcontrol\fR.
  2208.   
  2209. --- 39,41 ----
  2210.   There are three types of \fIescape\fR sequences:
  2211. ! header \fIcomponents\fR, built-in \fIfunctions\fR, and flow \fIcontrol\fR.
  2212.   
  2213. ***************
  2214. *** 101,104 ****
  2215.   Next,
  2216. ! all format text up to the corresponding `%>' control
  2217. ! escape (if any) is skipped.
  2218.   The `%>' control escape is not interpreted;
  2219. --- 101,104 ----
  2220.   Next,
  2221. ! all format text (if any) up to the corresponding `%>' control
  2222. ! escape is skipped.
  2223.   The `%>' control escape is not interpreted;
  2224. ***************
  2225. *** 172,173 ****
  2226. --- 172,174 ----
  2227.   values 0=false and 1=true.)
  2228. + Control escapes return a \fIboolean\fP value, and set \fInum\fP.
  2229.   
  2230. ***************
  2231. *** 179,182 ****
  2232.   unless called as part of an argument to another escape sequence.
  2233. ! Function escapes which return a \fIboolean\fR value do pass this value
  2234. ! back to their caller, but will never print out the value.
  2235.   
  2236. --- 180,183 ----
  2237.   unless called as part of an argument to another escape sequence.
  2238. ! Escapes which return a \fIboolean\fR value do pass this value
  2239. ! back to their caller in \fInum\fP, but will never print out the value.
  2240.   
  2241. ***************
  2242. *** 187,188 ****
  2243. --- 188,190 ----
  2244.   cur        integer    message is current
  2245. + .\" unseen        integer    message is unseen
  2246.   size        integer    size of message
  2247. ***************
  2248. *** 201,202 ****
  2249. --- 203,205 ----
  2250.   divide    literal    integer    \fInum\fR divided by \fIarg\fR
  2251. + modulo    literal    integer    \fInum\fR modulo \fIarg\fR
  2252.   num    literal    integer    Set \fInum\fR to \fIarg\fR
  2253. ***************
  2254. *** 204,206 ****
  2255.   getenv     literal    string    Set \fIstr\fR to environment value of \fIarg\fR
  2256. ! .\" dat    literal    int    ?
  2257.   nonzero    expr    boolean    \fInum\fR is non-zero
  2258. --- 207,209 ----
  2259.   getenv     literal    string    Set \fIstr\fR to environment value of \fIarg\fR
  2260. ! .\" dat    literal    int    return value of dat[arg]
  2261.   nonzero    expr    boolean    \fInum\fR is non-zero
  2262. ***************
  2263. *** 211,213 ****
  2264.   comp    comp    string    Set \fIstr\fR to component text
  2265. ! compval    comp    integer    \fInum\fR set to \*(lq\fBatoi\fR(\fIstr\fR\^)\*(rq
  2266.   .\" compflag    comp    integer    Set \fInum\fR to component flags bits
  2267. --- 214,216 ----
  2268.   comp    comp    string    Set \fIstr\fR to component text
  2269. ! compval    comp    integer    \fInum\fR set to \*(lq\fBatoi\fR(\fIcomp\fR\^)\*(rq
  2270.   .\" compflag    comp    integer    Set \fInum\fR to component flags bits
  2271. ***************
  2272. *** 218,219 ****
  2273. --- 221,223 ----
  2274.   putnumf    expr        print \fInum\fR in a fixed width
  2275. + .\" addtoseq literal    add msg to sequence (LBL option)
  2276.   .re    
  2277. ***************
  2278. *** 239,241 ****
  2279.   lmonth    date    string    month of the year
  2280. ! year    date    integer    year of the century
  2281.   zone    date    integer    timezone in hours
  2282. --- 243,245 ----
  2283.   lmonth    date    string    month of the year
  2284. ! year    date    integer    year (may be > 100)
  2285.   zone    date    integer    timezone in hours
  2286. ***************
  2287. *** 292,294 ****
  2288.   
  2289. ! writes the value of the header component \*(lqFrom:\*(rq to \fIstr\fR;
  2290.   then (\fImymbox\fR\^) reads \fIstr\fR 
  2291. --- 296,298 ----
  2292.   
  2293. ! writes the value of the header component \*(lqFrom:\*(rq to \fIstr\fR\^;
  2294.   then (\fImymbox\fR\^) reads \fIstr\fR 
  2295. ***************
  2296. *** 342,343 ****
  2297. --- 346,351 ----
  2298.   
  2299. + Comments may be inserted in most places where a function argument
  2300. + is not expected.  A comment begins with `%;' and ends with
  2301. + a (non-escaped) newline.
  2302.   With all this in mind,
  2303. ***************
  2304. *** 348,350 ****
  2305.   .ti +.5i
  2306. ! %4(putnumf(msg))%<(cur)+%| %>%<{replied}\-%| %>
  2307.   
  2308. --- 356,358 ----
  2309.   .ti +.5i
  2310. ! %4(msg)%<(cur)+%| %>%<{replied}\-%?{encrypted}E%| %>
  2311.   
  2312. ***************
  2313. *** 353,356 ****
  2314.   printed,
  2315. ! and if a \*(lqReplied:\*(rq field is present then a `\-' else a space should
  2316. ! be printed.
  2317.   Next:
  2318. --- 361,365 ----
  2319.   printed,
  2320. ! and if a \*(lqReplied:\*(rq field is present then a `\-' else 
  2321. ! if an \*(lqEncrypted:\*(rq field is present then an `E' otherwise
  2322. ! a space should be printed.
  2323.   Next:
  2324. ***************
  2325. *** 358,360 ****
  2326.   .ti +.5i
  2327. ! %02(putnumf(mon{date}))/%02(putnumf(mday{date}))
  2328.   
  2329. --- 367,369 ----
  2330.   .ti +.5i
  2331. ! %02(mon{date})/%02(mday{date})
  2332.   
  2333. ***************
  2334. *** 372,374 ****
  2335.   .ti +.5i
  2336. ! %<(mymbox{from})To:%14(putstrf(friendly{to}))
  2337.   
  2338. --- 381,383 ----
  2339.   .ti +.5i
  2340. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>
  2341.   
  2342. ***************
  2343. *** 375,376 ****
  2344. --- 384,386 ----
  2345.   if the message is from me,
  2346. + and there is a \*(lqTo:\*(rq header,
  2347.   print `To:' followed by a \*(lquser-friendly\*(rq rendering of the 
  2348. ***************
  2349. *** 380,385 ****
  2350.   .ti +.5i
  2351. ! %|%17(putstrf(friendly{from}))%>
  2352.   
  2353. ! if the message isn't from me,
  2354. ! then the print the \*(lqFrom:\*(rq address is printed.
  2355.   And finally,
  2356. --- 390,396 ----
  2357.   .ti +.5i
  2358. ! %<(zero)%17(friendly{from})%>
  2359.   
  2360. ! if either of the above two tests failed,
  2361. ! then the \*(lqFrom:\*(rq address is printed
  2362. ! in a \*(lquser-friendly\*(rq format.
  2363.   And finally,
  2364. ***************
  2365. *** 395,397 ****
  2366.   .ti +.5i
  2367. ! %(lit)%(formataddr %<{reply-to}%|
  2368.   
  2369. --- 406,408 ----
  2370.   .ti +.5i
  2371. ! %(lit)%(formataddr %<{reply-to}
  2372.   
  2373. ***************
  2374. *** 398,400 ****
  2375.   This clears \fIstr\fR and formats the \*(lqReply-To:\*(rq header 
  2376. ! if present.  If not present, the else clause is executed:
  2377.   
  2378. --- 409,411 ----
  2379.   This clears \fIstr\fR and formats the \*(lqReply-To:\*(rq header 
  2380. ! if present.  If not present, the else-if clause is executed.
  2381.   
  2382. ***************
  2383. *** 401,403 ****
  2384.   .ti +.5i
  2385. ! %<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\\
  2386.   
  2387. --- 412,414 ----
  2388.   .ti +.5i
  2389. ! %?{from}%?{sender}%?{return-path}%>)\\
  2390.   
  2391. ***************
  2392. *** 446,448 ****
  2393.   .ti +.5i
  2394. ! %<(nodate{date})%{date}%|%(tws{date})%>."%<{message-id}
  2395.   .ti +.5i
  2396. --- 457,459 ----
  2397.   .ti +.5i
  2398. ! %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
  2399.   .ti +.5i
  2400. ***************
  2401. *** 456,458 ****
  2402.   \*(lqYour message of \*(rq.  If the date was parseable, it is
  2403. ! output in official format, otherwise it is output as-is.
  2404.   The message-id is included if present.
  2405. --- 467,469 ----
  2406.   \*(lqYour message of \*(rq.  If the date was parseable, it is
  2407. ! output in a user-friendly format, otherwise it is output as-is.
  2408.   The message-id is included if present.
  2409. ***************
  2410. *** 472,474 ****
  2411.       else
  2412. !         print (rfc822(date.value))
  2413.       endif
  2414. --- 483,485 ----
  2415.       else
  2416. !         print (pretty(date.value))
  2417.       endif
  2418. *** ../mh-6.7.2/conf/doc/mh-hack.rf    Thu Apr  5 16:04:52 1990
  2419. --- conf/doc/mh-hack.rf    Tue May 12 15:23:45 1992
  2420. ***************
  2421. *** 1,6 ****
  2422.   .\"    @(MHWARNING)
  2423. ! .\" @(#)$Id: mh-hack.rf,v 1.5 90/04/05 15:13:03 sources Exp $
  2424. ! .SC MH\-HACK 8
  2425.   .NA
  2426. ! mh\-hack \- how to hack MH
  2427.   .SY
  2428. --- 1,6 ----
  2429.   .\"    @(MHWARNING)
  2430. ! .\" @(#)$Id: mh-hack.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
  2431. ! .SC MH-HACK 8
  2432.   .NA
  2433. ! mh-hack \- how to hack MH
  2434.   .SY
  2435. *** ../mh-6.7.2/conf/doc/mh-mail.rf    Thu Apr  5 16:04:52 1990
  2436. --- conf/doc/mh-mail.rf    Tue May 12 15:23:47 1992
  2437. ***************
  2438. *** 1,6 ****
  2439.   .\"    @(MHWARNING)
  2440. ! .\" @(#)$Id: mh-mail.rf,v 1.5 90/04/05 15:13:12 sources Exp $
  2441. ! .SC MH\-MAIL 5
  2442.   .NA
  2443. ! mh\-mail \- message format for MH message system
  2444.   .SY
  2445. --- 1,6 ----
  2446.   .\"    @(MHWARNING)
  2447. ! .\" @(#)$Id: mh-mail.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
  2448. ! .SC MH-MAIL 5
  2449.   .NA
  2450. ! mh-mail \- message format for MH message system
  2451.   .SY
  2452. *** ../mh-6.7.2/conf/doc/mh-mts.rf    Wed Nov 21 10:09:34 1990
  2453. --- conf/doc/mh-mts.rf    Tue May 12 15:23:48 1992
  2454. ***************
  2455. *** 1,6 ****
  2456.   .\"    @(MHWARNING)
  2457. ! .\" @(#)$Id: mh-mts.rf,v 1.7 90/11/21 10:09:32 mh Exp $
  2458. ! .SC MH\-MTS 8
  2459.   .NA
  2460. ! mh\-mts \- the MH interface to the message transport system
  2461.   .SY
  2462. --- 1,6 ----
  2463.   .\"    @(MHWARNING)
  2464. ! .\" @(#)$Id: mh-mts.rf,v 1.10 1992/05/12 22:23:34 jromine Exp $
  2465. ! .SC MH-MTS 8
  2466.   .NA
  2467. ! mh-mts \- the MH interface to the message transport system
  2468.   .SY
  2469. ***************
  2470. *** 9,10 ****
  2471. --- 9,13 ----
  2472.   .ti .5i
  2473. + Zmailer
  2474. + .ti .5i
  2475.   MMDF (any release)
  2476. ***************
  2477. *** 24,25 ****
  2478. --- 27,36 ----
  2479.   or \fIMH\fR may open a TCP/IP connection to the SMTP server on the localhost.
  2480. + When communicating with \fIzmailer\fP,
  2481. + the \fISendMail\fP compatibility program is
  2482. + required to be installed in /usr/lib.
  2483. + \fIMH\fP communicates with \fIzmailer\fP
  2484. + by using the SMTP.
  2485. + It does this by invoking the \fB/usr/lib/sendmail\fP
  2486. + compatibility program directly, with the `\-bs' option.
  2487.   
  2488. *** ../mh-6.7.2/conf/doc/mh-profile.rf    Tue Dec 18 12:49:22 1990
  2489. --- conf/doc/mh-profile.rf    Wed Dec  2 14:13:43 1992
  2490. ***************
  2491. *** 1,8 ****
  2492.   .\"    @(MHWARNING)
  2493. ! .\" @(#)$Id: mh-profile.rf,v 1.8 90/12/18 12:49:13 mh Exp $
  2494. ! .SC MH\-PROFILE 5
  2495.   .NA
  2496. !  \&.mh\(ruprofile \- user customization for MH message system
  2497.   .SY
  2498. ! any \fIMH\fR command
  2499.   .DE
  2500. --- 1,8 ----
  2501.   .\"    @(MHWARNING)
  2502. ! .\" @(#)$Id: mh-profile.rf,v 1.19 1992/12/02 22:13:41 jromine Exp $
  2503. ! .SC MH-PROFILE 5
  2504.   .NA
  2505. ! mh-profile \- user profile customization for MH message handler
  2506.   .SY
  2507. ! \&\fI.mh\(ruprofile\fP
  2508.   .DE
  2509. ***************
  2510. *** 42,44 ****
  2511.   Keeps track of the current open folder.
  2512. ! (context, default: +inbox)
  2513.   
  2514. --- 42,44 ----
  2515.   Keeps track of the current open folder.
  2516. ! (context, default: folder specified by \*(lqInbox\*(rq)
  2517.   
  2518. ***************
  2519. *** 45,46 ****
  2520. --- 45,52 ----
  2521.   .ti -1i
  2522. + Inbox:    inbox
  2523. + .br
  2524. + Defines the name of your inbox.
  2525. + (profile, default: inbox)
  2526. + .ti -1i
  2527.   Previous\-Sequence:\ pseq
  2528. ***************
  2529. *** 74,77 ****
  2530.   Otherwise,
  2531. ! for each name given,
  2532. ! the sequence is first zero'd and then each message is added to the sequence.
  2533.   (profile, no default)
  2534. --- 80,82 ----
  2535.   Otherwise,
  2536. ! each message is added to each sequence name given.
  2537.   (profile, no default)
  2538. ***************
  2539. *** 146,148 ****
  2540.   .br
  2541. ! The contents of the folder\-stack for the \fIfolder\fR command.
  2542.   (context, no default)
  2543. --- 151,153 ----
  2544.   .br
  2545. ! The contents of the folder-stack for the \fIfolder\fR command.
  2546.   (context, no default)
  2547. ***************
  2548. *** 154,156 ****
  2549.   its other tasks.
  2550. ! \fIMHE\fR is Brian Reid's \fIEmacs\fR front\-end for \fIMH\fR.
  2551.   An early version is supplied with the \fImh.6\fR distribution.
  2552. --- 159,161 ----
  2553.   its other tasks.
  2554. ! \fIMHE\fR is Brian Reid's \fIEmacs\fR front-end for \fIMH\fR.
  2555.   An early version is supplied with the \fImh.6\fR distribution.
  2556. ***************
  2557. *** 158,160 ****
  2558.   
  2559. ! .ti \-1i
  2560.   Alternate\-Mailboxes: mh@uci\-750a, bug-mh*
  2561. --- 163,165 ----
  2562.   
  2563. ! .ti -1i
  2564.   Alternate\-Mailboxes: mh@uci\-750a, bug-mh*
  2565. ***************
  2566. *** 173,175 ****
  2567.   an asterisk (`*') may appear at either or both ends of the mailbox and host
  2568. ! to indicate wild\-card matching.
  2569.   (profile, default: your user-id)
  2570. --- 178,180 ----
  2571.   an asterisk (`*') may appear at either or both ends of the mailbox and host
  2572. ! to indicate wild-card matching.
  2573.   (profile, default: your user-id)
  2574. ***************
  2575. *** 177,181 ****
  2576.   .ti -1i
  2577. ! Aliasfile: aliases
  2578.   .br
  2579. ! Indicates a default aliases file for \fIali\fR, \fIwhom\fR, and \fIsend\fR.
  2580.   This may be used instead of the `\-alias file' switch.
  2581. --- 182,186 ----
  2582.   .ti -1i
  2583. ! Aliasfile: aliases other-alias
  2584.   .br
  2585. ! Indicates aliases files for \fIali\fR, \fIwhom\fR, and \fIsend\fR.
  2586.   This may be used instead of the `\-alias file' switch.
  2587. ***************
  2588. *** 207,209 ****
  2589.   Tells \fIinc\fR your maildrop, if different from the default.
  2590. ! This is superceded by the \fB$MAILDROP\fR envariable.
  2591.   (profile, default: @(MHDROPLOC))
  2592. --- 212,214 ----
  2593.   Tells \fIinc\fR your maildrop, if different from the default.
  2594. ! This is superceded by the \fBMAILDROP\fR envariable.
  2595.   (profile, default: @(MHDROPLOC))
  2596. ***************
  2597. *** 214,218 ****
  2598.   Tells \fIsend\fR your mail signature.
  2599. ! This is superceded by the \fB$SIGNATURE\fR envariable.
  2600.   On hosts where \fIMH\fR was configured with the UCI option,
  2601. ! if \fB$SIGNATURE\fR is not set and this profile entry is not present,
  2602.   the file $HOME/.signature is consulted.
  2603. --- 219,223 ----
  2604.   Tells \fIsend\fR your mail signature.
  2605. ! This is superceded by the \fBSIGNATURE\fR envariable.
  2606.   On hosts where \fIMH\fR was configured with the UCI option,
  2607. ! if \fBSIGNATURE\fR is not set and this profile entry is not present,
  2608.   the file $HOME/.signature is consulted.
  2609. ***************
  2610. *** 253,255 ****
  2611.   
  2612. ! If you define the envariable \fB$MH\fR,
  2613.   you can specify a profile other than \fI\&.mh\(ruprofile\fR to be read
  2614. --- 258,260 ----
  2615.   
  2616. ! If you define the envariable \fBMH\fR,
  2617.   you can specify a profile other than \fI\&.mh\(ruprofile\fR to be read
  2618. ***************
  2619. *** 256,258 ****
  2620.   by the \fIMH\fR programs that you invoke.
  2621. ! If the value of \fB$MH\fR is not absolute,
  2622.   (i.e., does not begin with a \fB/\fR\0),
  2623. --- 261,263 ----
  2624.   by the \fIMH\fR programs that you invoke.
  2625. ! If the value of \fBMH\fR is not absolute,
  2626.   (i.e., does not begin with a \fB/\fR\0),
  2627. ***************
  2628. *** 259,261 ****
  2629.   it will be presumed to start from the current working directory.
  2630. ! This is one of the very few exceptions in \fIMH\fR where non\-absolute
  2631.   pathnames are not considered relative to the user's \fIMH\fR directory.
  2632. --- 264,266 ----
  2633.   it will be presumed to start from the current working directory.
  2634. ! This is one of the very few exceptions in \fIMH\fR where non-absolute
  2635.   pathnames are not considered relative to the user's \fIMH\fR directory.
  2636. ***************
  2637. *** 263,265 ****
  2638.   Similarly,
  2639. ! if you define the envariable \fB$MHCONTEXT\fR,
  2640.   you can specify a context other than the normal context file
  2641. --- 268,270 ----
  2642.   Similarly,
  2643. ! if you define the envariable \fBMHCONTEXT\fR,
  2644.   you can specify a context other than the normal context file
  2645. ***************
  2646. *** 267,269 ****
  2647.   As always,
  2648. ! unless the value of \fB$MHCONTEXT\fR is absolute,
  2649.   it will be presumed to start from your \fIMH\fR directory.
  2650. --- 272,274 ----
  2651.   As always,
  2652. ! unless the value of \fBMHCONTEXT\fR is absolute,
  2653.   it will be presumed to start from your \fIMH\fR directory.
  2654. ***************
  2655. *** 274,276 ****
  2656.   .ti -.5i
  2657. ! \fB$MAILDROP\fR\0: tells \fIinc\fR the default maildrop
  2658.   .br
  2659. --- 279,281 ----
  2660.   .ti -.5i
  2661. ! \fBMAILDROP\fR\0: tells \fIinc\fR the default maildrop
  2662.   .br
  2663. ***************
  2664. *** 279,281 ****
  2665.   .ti -.5i
  2666. ! \fB$SIGNATURE\fR\0: tells \fIsend\fR and \fIpost\fR your mail signature
  2667.   .br
  2668. --- 284,286 ----
  2669.   .ti -.5i
  2670. ! \fBSIGNATURE\fR\0: tells \fIsend\fR and \fIpost\fR your mail signature
  2671.   .br
  2672. ***************
  2673. *** 284,286 ****
  2674.   .ti -.5i
  2675. ! \fB$HOME\fR\0: tells all \fIMH\fR programs your home directory
  2676.   
  2677. --- 289,291 ----
  2678.   .ti -.5i
  2679. ! \fBHOME\fR\0: tells all \fIMH\fR programs your home directory
  2680.   
  2681. ***************
  2682. *** 287,289 ****
  2683.   .ti -.5i
  2684. ! \fB$SHELL\fR\0: tells \fIbbl\fR the default shell to run
  2685.   
  2686. --- 292,294 ----
  2687.   .ti -.5i
  2688. ! \fBSHELL\fR\0: tells \fIbbl\fR the default shell to run
  2689.   
  2690. ***************
  2691. *** 290,296 ****
  2692.   .ti -.5i
  2693. ! \fB$TERM\fR\0: tells \fIMH\fR your terminal type
  2694.   .br
  2695. ! The \fB$TERMCAP\fR envariable is also consulted.
  2696.   In particular,
  2697. ! these tells \fIscan\fR and \fImhl\fR how to clear your terminal,
  2698.   and how many columns wide your terminal is.
  2699. --- 295,301 ----
  2700.   .ti -.5i
  2701. ! \fBTERM\fR\0: tells \fIMH\fR your terminal type
  2702.   .br
  2703. ! The \fBTERMCAP\fR envariable is also consulted.
  2704.   In particular,
  2705. ! these tell \fIscan\fR and \fImhl\fR how to clear your terminal,
  2706.   and how many columns wide your terminal is.
  2707. ***************
  2708. *** 299,301 ****
  2709.   .ti -.5i
  2710. ! \fB$editalt\fR\0: the alternate message
  2711.   .br
  2712. --- 304,306 ----
  2713.   .ti -.5i
  2714. ! \fBeditalt\fR\0: the alternate message
  2715.   .br
  2716. ***************
  2717. *** 302,304 ****
  2718.   This is set by \fIdist\fR and \fIrepl\fR during edit sessions
  2719. ! so you can peruse the message being distributed or replied-to.
  2720.   The message is also available through a link called \*(lq@\*(rq
  2721. --- 307,309 ----
  2722.   This is set by \fIdist\fR and \fIrepl\fR during edit sessions
  2723. ! so you can peruse the message being distributed or replied to.
  2724.   The message is also available through a link called \*(lq@\*(rq
  2725. ***************
  2726. *** 308,310 ****
  2727.   .ti -.5i
  2728. ! \fB$mhdraft\fR\0: the path to the working draft
  2729.   .br
  2730. --- 313,315 ----
  2731.   .ti -.5i
  2732. ! \fBmhdraft\fR\0: the path to the working draft
  2733.   .br
  2734. ***************
  2735. *** 314,325 ****
  2736.   In addition,
  2737. ! \fIdist\fR, \fIforw\fR, and \fIrepl\fR set \fB$mhfolder\fR if appropriate.
  2738.   Further,
  2739. ! \fIdist\fR and \fIrepl\fR set \fB$mhaltmsg\fR to tell the
  2740.   \fIwhatnowproc\fR about an alternate message associated with the draft
  2741. ! (the message being distributed or replied\-to),
  2742.   and
  2743. ! \fIdist\fR sets \fB$mhdist\fR to tell the \fIwhatnowproc\fR that
  2744. ! message re\-distribution is occurring.
  2745.   Also,
  2746. ! \fB$mheditor\fR is set to tell the \fIwhatnowproc\fR the user's choice of
  2747.   editor (unless overridden by `\-noedit').
  2748. --- 319,330 ----
  2749.   In addition,
  2750. ! \fIdist\fR, \fIforw\fR, and \fIrepl\fR set \fBmhfolder\fR if appropriate.
  2751.   Further,
  2752. ! \fIdist\fR and \fIrepl\fR set \fBmhaltmsg\fR to tell the
  2753.   \fIwhatnowproc\fR about an alternate message associated with the draft
  2754. ! (the message being distributed or replied to),
  2755.   and
  2756. ! \fIdist\fR sets \fBmhdist\fR to tell the \fIwhatnowproc\fR that
  2757. ! message re-distribution is occurring.
  2758.   Also,
  2759. ! \fBmheditor\fR is set to tell the \fIwhatnowproc\fR the user's choice of
  2760.   editor (unless overridden by `\-noedit').
  2761. ***************
  2762. *** 326,332 ****
  2763.   Similarly,
  2764. ! \fB$mhuse\fR may be set by \fIcomp\fR.
  2765.   Finally,
  2766. ! \fB$mhmessages\fR is set by \fIdist\fR, \fIforw\fR, and \fIrepl\fR
  2767.   if annotations are to occur
  2768. ! (along with \fB$mhannotate\fR, and \fB$mhinplace\fR).
  2769.   It's amazing all the information that has to get passed via envariables to
  2770. --- 331,337 ----
  2771.   Similarly,
  2772. ! \fBmhuse\fR may be set by \fIcomp\fR.
  2773.   Finally,
  2774. ! \fBmhmessages\fR is set by \fIdist\fR, \fIforw\fR, and \fIrepl\fR
  2775.   if annotations are to occur
  2776. ! (along with \fBmhannotate\fR, and \fBmhinplace\fR).
  2777.   It's amazing all the information that has to get passed via envariables to
  2778. ***************
  2779. *** 344,346 ****
  2780.   are not given any `msgs' arguments,
  2781. ! then they will default to using the file indicated by \fB$mhdraft\fR.
  2782.   This is useful for getting the default behavior supplied by the default
  2783. --- 349,351 ----
  2784.   are not given any `msgs' arguments,
  2785. ! then they will default to using the file indicated by \fBmhdraft\fR.
  2786.   This is useful for getting the default behavior supplied by the default
  2787. ***************
  2788. *** 349,351 ****
  2789.   .ti -.5i
  2790. ! \fB$mhfolder\fR\0: the folder containing the alternate message
  2791.   .br
  2792. --- 354,356 ----
  2793.   .ti -.5i
  2794. ! \fBmhfolder\fR\0: the folder containing the alternate message
  2795.   .br
  2796. ***************
  2797. *** 353,356 ****
  2798.   so you can peruse other messages in the current folder
  2799. ! besides the one being distributed or replied-to.
  2800. ! The \fB$mhfolder\fR envariable is also
  2801.   set by \fIshow\fR, \fIprev\fR, and \fInext\fR
  2802. --- 358,361 ----
  2803.   so you can peruse other messages in the current folder
  2804. ! besides the one being distributed or replied to.
  2805. ! The \fBmhfolder\fR envariable is also
  2806.   set by \fIshow\fR, \fIprev\fR, and \fInext\fR
  2807. ***************
  2808. *** 359,363 ****
  2809.   .ti -.5i
  2810. ! \fB$MHBBRC\fR\0: 
  2811.   .br
  2812. ! If you define the envariable \fB$MHBBRC\fR,
  2813.   you can specify a BBoards information file other than \fI\&.bbrc\fR to be
  2814. --- 364,368 ----
  2815.   .ti -.5i
  2816. ! \fBMHBBRC\fR\0: 
  2817.   .br
  2818. ! If you define the envariable \fBMHBBRC\fR,
  2819.   you can specify a BBoards information file other than \fI\&.bbrc\fR to be
  2820. ***************
  2821. *** 364,366 ****
  2822.   read by \fIbbc\fR.
  2823. ! If the value of \fB$MHBBRC\fR is not absolute,
  2824.   (i.e., does not begin with a \fB/\fR\0),
  2825. --- 369,371 ----
  2826.   read by \fIbbc\fR.
  2827. ! If the value of \fBMHBBRC\fR is not absolute,
  2828.   (i.e., does not begin with a \fB/\fR\0),
  2829. ***************
  2830. *** 369,371 ****
  2831.   .ti -.5i
  2832. ! \fB$MHFD\fR\0: 
  2833.   .br
  2834. --- 374,376 ----
  2835.   .ti -.5i
  2836. ! \fBMHFD\fR\0: 
  2837.   .br
  2838. ***************
  2839. *** 374,380 ****
  2840.   then if this envariable is set,
  2841. ! \fIMH\fR considers it to be the number of a file\-descriptor which is opened,
  2842. ! read\-only to the \fIMH\fR profile.
  2843.   Similarly,
  2844. ! if the envariable \fB$MHCONTEXTFD\fR is set,
  2845. ! this is the number of a file\-descriptor which is opened read\-only
  2846.   to the \fIMH\fR context.
  2847. --- 379,385 ----
  2848.   then if this envariable is set,
  2849. ! \fIMH\fR considers it to be the number of a file descriptor which is opened,
  2850. ! read-only to the \fIMH\fR profile.
  2851.   Similarly,
  2852. ! if the envariable \fBMHCONTEXTFD\fR is set,
  2853. ! this is the number of a file descriptor which is opened read-only
  2854.   to the \fIMH\fR context.
  2855. ***************
  2856. *** 382,384 ****
  2857.   and is used to examine possible speed improvements for \fIMH\fR startup.
  2858. ! Note that these envariables must be set and non\-empty to enable this feature.
  2859.   However,
  2860. --- 387,389 ----
  2861.   and is used to examine possible speed improvements for \fIMH\fR startup.
  2862. ! Note that these envariables must be set and non-empty to enable this feature.
  2863.   However,
  2864. ***************
  2865. *** 387,389 ****
  2866.   this scheme is used.
  2867. ! These file\-descriptors are not closed throughout the execution of the
  2868.   \fIMH\fR program,
  2869. --- 392,394 ----
  2870.   this scheme is used.
  2871. ! These file descriptors are not closed throughout the execution of the
  2872.   \fIMH\fR program,
  2873. ***************
  2874. *** 403,405 ****
  2875.   .Sa
  2876. ! mh(1), environ(5)
  2877.   .De
  2878. --- 408,410 ----
  2879.   .Sa
  2880. ! mh(1), environ(5), mh-sequence(5)
  2881.   .De
  2882. ***************
  2883. *** 410,412 ****
  2884.   In previous versions of \fIMH\fR,
  2885. ! the current\-message value of a writable folder was kept in a file
  2886.   called \*(lqcur\*(rq in the folder itself.
  2887. --- 415,417 ----
  2888.   In previous versions of \fIMH\fR,
  2889. ! the current-message value of a writable folder was kept in a file
  2890.   called \*(lqcur\*(rq in the folder itself.
  2891. ***************
  2892. *** 413,415 ****
  2893.   In \fImh.3\fR,
  2894. ! the \fI\&.mh\(ruprofile\fR contained the current\-message values for
  2895.   all folders, regardless of their writability.
  2896. --- 418,420 ----
  2897.   In \fImh.3\fR,
  2898. ! the \fI\&.mh\(ruprofile\fR contained the current-message values for
  2899.   all folders, regardless of their writability.
  2900. ***************
  2901. *** 476,478 ****
  2902.   
  2903. ! In this way, the user can avoid lengthy type\-in to the shell,
  2904.   and still give \fIMH\fR commands safely.  (Recall that some \fIMH\fR
  2905. --- 481,483 ----
  2906.   
  2907. ! In this way, the user can avoid lengthy type-in to the shell,
  2908.   and still give \fIMH\fR commands safely.  (Recall that some \fIMH\fR
  2909. *** ../mh-6.7.2/conf/doc/mh-sequence.rf    Wed Jan 29 15:43:10 1992
  2910. --- conf/doc/mh-sequence.rf    Tue May 12 15:23:52 1992
  2911. ***************
  2912. *** 1,6 ****
  2913.   .\"    @(MHWARNING)
  2914. ! .\" @(#)$Id: mh-sequence.rf,v 1.9 1991/01/09 11:34:34 mh Exp jromine $
  2915. ! .SC MH\-SEQUENCE 5
  2916.   .NA
  2917. ! mh\-sequence \- sequence specification for MH message system
  2918.   .SY
  2919. --- 1,6 ----
  2920.   .\"    @(MHWARNING)
  2921. ! .\" @(#)$Id: mh-sequence.rf,v 1.11 1992/05/12 22:23:34 jromine Exp $
  2922. ! .SC MH-SEQUENCE 5
  2923.   .NA
  2924. ! mh-sequence \- sequence specification for MH message system
  2925.   .SY
  2926. *** ../mh-6.7.2/conf/doc/mh-tailor.rf    Mon Jan  7 16:13:31 1991
  2927. --- conf/doc/mh-tailor.rf    Wed Dec  2 14:16:22 1992
  2928. ***************
  2929. *** 1,10 ****
  2930.   .\"    @(MHWARNING)
  2931. ! .\" @(#)$Id: mh-tailor.rf,v 2.11 91/01/07 16:13:27 mh Exp $
  2932. ! .SC MH\-TAILOR 5
  2933.   .NA
  2934. ! @(MHETCPATH)/mtstailor \- system customization for MH message system
  2935.   .SY
  2936. ! any \fIMH\fR command that interacts with the MTS
  2937.   .DE
  2938. ! The file @(MHETCPATH)/mtstailor defines run\-time options for those \fIMH\fR
  2939.   programs which interact (in some form) with the message transport system.
  2940. --- 1,11 ----
  2941.   .\"    @(MHWARNING)
  2942. ! .\" @(#)$Id: mh-tailor.rf,v 2.19 1992/12/02 22:16:12 jromine Exp $
  2943. ! .SC MH-TAILOR 5
  2944.   .NA
  2945. ! mh-tailor, mtstailor \- system customization for MH message handler
  2946.   .SY
  2947. ! \fI@(MHETCPATH)/mtstailor\fP
  2948.   .DE
  2949. ! The file @(MHETCPATH)/mtstailor defines run-time options for those \fIMH\fR
  2950.   programs which interact (in some form) with the message transport system.
  2951. ***************
  2952. *** 14,15 ****
  2953. --- 15,18 ----
  2954.   
  2955. + Each option should be given on a single line.  Blank lines
  2956. + and lines which begin with `#' are ignored.
  2957.   The options available along with default values and a description of their
  2958. ***************
  2959. *** 29,30 ****
  2960. --- 32,44 ----
  2961.   .ti -.5i
  2962. + localdomain:
  2963. + .br
  2964. + If this is set, a `.' followed by this string will be
  2965. + appended to your host name.
  2966. + This might be useful for sites
  2967. + where the host name returned by the system
  2968. + (e.g., <whoami.h>, gethostname, etc.), 
  2969. + is not a \*(lqfully qualified domain name\*(rq
  2970. + (i.e., does not contain a `.').
  2971. + .ti -.5i
  2972.   systemname:
  2973. ***************
  2974. *** 53,55 ****
  2975.   .br
  2976. ! The beginning\-of\-message delimiter for maildrops.
  2977.   
  2978. --- 67,69 ----
  2979.   .br
  2980. ! The beginning-of-message delimiter for maildrops.
  2981.   
  2982. ***************
  2983. *** 58,60 ****
  2984.   .br
  2985. ! The end\-of\-message delimiter for maildrops.
  2986.   
  2987. --- 72,74 ----
  2988.   .br
  2989. ! The end-of-message delimiter for maildrops.
  2990.   
  2991. ***************
  2992. *** 75,80 ****
  2993.   .br
  2994. ! The locking\-discipline to perform.
  2995. ! A value of \*(lq0\*(rq means to use \fIflock\fR if available,
  2996. ! or \fIlockf\fR if \fBLOCKF\fP was defined when building \fIMH\fP.
  2997. ! On non-\fBBSD42\fP systems,
  2998.   standard \fIBellMail\fR locking is used.
  2999. --- 89,95 ----
  3000.   .br
  3001. ! The locking discipline to perform.
  3002. ! A value of \*(lq0\*(rq means to use kernel-level locking
  3003. ! if available.
  3004. ! (See below for more details.)
  3005. ! On systems compiled without kernel-level locking,
  3006.   standard \fIBellMail\fR locking is used.
  3007. ***************
  3008. *** 89,91 ****
  3009.   The name of the directory for making locks.
  3010. ! If your system doesn't have the \fIflock\fR or \fIlockf\fP syscalls,
  3011.   then this directory is used when creating locks.
  3012. --- 104,106 ----
  3013.   The name of the directory for making locks.
  3014. ! If your system isn't configured to use kernel-level locking,
  3015.   then this directory is used when creating locks.
  3016. ***************
  3017. *** 97,99 ****
  3018.   .br
  3019. ! The name of the system\-wide default \fI\&.maildelivery\fR file.
  3020.   See \fImhook\fR\0(1) for the details.
  3021. --- 112,114 ----
  3022.   .br
  3023. ! The name of the system-wide default \fI\&.maildelivery\fR file.
  3024.   See \fImhook\fR\0(1) for the details.
  3025. ***************
  3026. *** 103,105 ****
  3027.   .br
  3028. ! The highest user\-id which should NOT receive mail addressed to
  3029.   \*(lqeveryone\*(rq.
  3030. --- 118,120 ----
  3031.   .br
  3032. ! The highest user-id which should NOT receive mail addressed to
  3033.   \*(lqeveryone\*(rq.
  3034. ***************
  3035. *** 144,147 ****
  3036.   .br
  3037. ! The path to the program that filters \fIUUCP\fR\-style maildrops to
  3038. ! \fIMMDF\fR\-style maildrops.
  3039.   .\" @END: MF
  3040. --- 159,162 ----
  3041.   .br
  3042. ! The path to the program that filters \fIUUCP\fR\^-style maildrops to
  3043. ! \fIMMDF\fR\^-style maildrops.
  3044.   .\" @END: MF
  3045. ***************
  3046. *** 202,204 ****
  3047.   .br
  3048. ! A file containing a list of hosts that can sent ARPAnet mail.
  3049.   
  3050. --- 217,219 ----
  3051.   .br
  3052. ! A file containing a list of hosts that can send ARPAnet mail.
  3053.   
  3054. ***************
  3055. *** 226,228 ****
  3056.   .br
  3057. ! 2. Words are surrounded by whitespace.
  3058.   .br
  3059. --- 241,243 ----
  3060.   .br
  3061. ! 2. Words are surrounded by white space.
  3062.   .br
  3063. ***************
  3064. *** 309,311 ****
  3065.   user.
  3066. ! (The user\-id \*(lqftp\*(rq is highly recommended.)
  3067.   This variable should be set on both the POP BBoards client and service hosts.
  3068. --- 324,326 ----
  3069.   user.
  3070. ! (The user-id \*(lqftp\*(rq is highly recommended.)
  3071.   This variable should be set on both the POP BBoards client and service hosts.
  3072. ***************
  3073. *** 342,348 ****
  3074.   the second says where lock files should be created.
  3075.   The \*(lqlockstyle\*(rq variable can take on three values: 0, 1, 2.
  3076. ! A value of 0 is useful on \fBBSD42\fP systems.
  3077. ! If you included the \fBLOCKF\fP option when building \fIMH\fP, the
  3078. ! \fIlockf\fP syscall is used, otherwise the \fIflock\fP syscall is used.
  3079. ! If you're not on a 4.2BSD system,
  3080.   a locking style of 0 is considered the same as locking style 1.
  3081. --- 357,369 ----
  3082.   the second says where lock files should be created.
  3083.   The \*(lqlockstyle\*(rq variable can take on three values: 0, 1, 2.
  3084. ! A value of 0 is useful on systems with kernel-level locking.
  3085. ! If you are on a \fBBSD42\fP system, \fIMH\fP assumes
  3086. ! you have the \fIflock\fR system call.
  3087. ! On other systems:
  3088. ! define \fBFLOCK\fP if you want to use the \fIflock\fP system call;
  3089. ! define \fBLOCKF\fP if you want to use the \fIlockf\fP system call;
  3090. ! or define \fBFCNTL\fP if you want to use the \fIfcntl\fP system call
  3091. ! for kernel-level locking.
  3092. ! If you haven't configured \fIMH\fP to use kernel-level locking,
  3093.   a locking style of 0 is considered the same as locking style 1.
  3094. ***************
  3095. *** 350,352 ****
  3096.   A value of 1 or 2 specifies that a file should be created whose existence
  3097. ! means \*(lqlocked\*(rq and whose non\-existence means \*(lqunlocked\*(rq.
  3098.   A value of 1 says to construct the lockname by appending \*(lq.lock\*(rq to
  3099. --- 371,373 ----
  3100.   A value of 1 or 2 specifies that a file should be created whose existence
  3101. ! means \*(lqlocked\*(rq and whose non-existence means \*(lqunlocked\*(rq.
  3102.   A value of 1 says to construct the lockname by appending \*(lq.lock\*(rq to
  3103. *** ../mh-6.7.2/conf/doc/mh.rf    Mon Jan  7 16:56:42 1991
  3104. --- conf/doc/mh.rf    Wed Oct 28 09:00:35 1992
  3105. ***************
  3106. *** 1,3 ****
  3107.   .\"    @(MHWARNING)
  3108. ! .\" @(#)$Id: mh.rf,v 1.10 91/01/07 16:56:36 mh Exp $
  3109.   .if '\*(ZZ'-man' \{\
  3110. --- 1,3 ----
  3111.   .\"    @(MHWARNING)
  3112. ! .\" @(#)$Id: mh.rf,v 1.12 1992/10/28 17:00:27 jromine Exp $
  3113.   .if '\*(ZZ'-man' \{\
  3114. ***************
  3115. *** 172,173 ****
  3116. --- 172,174 ----
  3117.   ^mhook (1)~^\- MH receive\-mail hooks
  3118. + ^mhparam (1)~^\- print MH profile components
  3119.   ^mhpath (1)~^\- print full pathnames of MH messages and folders
  3120. ***************
  3121. *** 188,189 ****
  3122. --- 189,191 ----
  3123.   ^show (1)~^\- show (list) messages
  3124. + ^slocal (1)~^\- special local mail delivery
  3125.   ^sortm (1)~^\- sort messages
  3126. ***************
  3127. *** 206,207 ****
  3128. --- 208,210 ----
  3129.   ^dp (8)~^\- parse dates 822\-style
  3130. + ^fmtdump (8)~^\- decode \fIMH\fP format files
  3131.   ^install\-mh (8)~^\- initialize the MH environment
  3132. *** ../mh-6.7.2/conf/doc/mhl.rf    Thu Apr  5 16:04:38 1990
  3133. --- conf/doc/mhl.rf    Fri Dec  4 10:59:24 1992
  3134. ***************
  3135. *** 1,3 ****
  3136.   .\"    @(MHWARNING)
  3137. ! .\" @(#)$Id: mhl.rf,v 1.7 90/04/05 15:10:28 sources Exp $
  3138.   .SC MHL 1
  3139. --- 1,3 ----
  3140.   .\"    @(MHWARNING)
  3141. ! .\" @(#)$Id: mhl.rf,v 1.11 1992/12/04 18:59:22 jromine Exp $
  3142.   .SC MHL 1
  3143. ***************
  3144. *** 158,159 ****
  3145. --- 158,161 ----
  3146.   nosplit    flag    combine multiple fields into a single field
  3147. + newline    flag    print newline at end of components (default)
  3148. + nonewline    flag    don't print newline at end of components
  3149.   formatfield    string    format string for this component (see below)
  3150. ***************
  3151. *** 168,170 ****
  3152.   Integer\-valued variables are given decimal values,
  3153. ! while string\-valued variables are given arbirtray text bracketed by
  3154.   double\-quotes.
  3155. --- 170,172 ----
  3156.   Integer\-valued variables are given decimal values,
  3157. ! while string\-valued variables are given arbitrary text bracketed by
  3158.   double\-quotes.
  3159. ***************
  3160. *** 250,251 ****
  3161. --- 252,256 ----
  3162.   address parsing is not enabled.
  3163. + The \*(lqnonewline\*(rq option interacts badly 
  3164. + with \*(lqcompress\*(rq and \*(lqsplit\*(rq.
  3165.   .En
  3166. *** /dev/null    Tue Dec 15 08:01:10 1992
  3167. --- conf/doc/mhn.rf    Thu Dec 10 15:59:13 1992
  3168. ***************
  3169. *** 0 ****
  3170. --- 1,1025 ----
  3171. + .\"    @(MHWARNING)
  3172. + .\" @(#)$Id: mhn.rf,v 1.8 1992/12/10 23:59:10 jromine Exp $
  3173. + .SC MHN 1
  3174. + .NA
  3175. + mhn \- multi-media MH
  3176. + .SY
  3177. + mhn
  3178. + \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
  3179. + .br
  3180. + \%[\-list\0\%[\-headers]\0\%[\-noheaders]
  3181. + .br
  3182. +        \%[\-realsize]\0\%[\-norealsize]] \%[-nolist]
  3183. + .br
  3184. + \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
  3185. + .br
  3186. +        \%[\-form\0formfile]] \%[\-noshow]
  3187. + .br
  3188. + \%[\-store\0\%[\-auto]\0\%[\-noauto]] \%[\-nostore]
  3189. + .br
  3190. + \%[\-verbose] \%[\-noverbose]
  3191. + \%[\-rfc934mode] \%[\-norfc934mode]
  3192. + \%[\-ebcdicsafe] \%[\-noebcdicsafe]
  3193. + .br
  3194. + \%[\-help]
  3195. + .DE
  3196. + The \fImhn\fR command manipulates multi-media messages as specified in
  3197. + RFC 1341.
  3198. + Three action switches direct the operation of \fImhn\fR,
  3199. + namely `\-list', `\-show', and `\-store'.
  3200. + Any of these switches may be used concurrently.
  3201. + Normally these action switches will operate on the content of each of the
  3202. + named messages.
  3203. + However,
  3204. + by using the `\-part' and `\-type' switches,
  3205. + the scope of the operation can be focused on particular
  3206. + subparts (of a multipart content) and/or particular content types.
  3207. + A part specification consists of a series of numbers separated by dots.
  3208. + For example,
  3209. + in a multipart content containing three parts,
  3210. + these would be named as 1, 2, and 3, respectively.
  3211. + If part 2 was also a multipart content containing two parts,
  3212. + these would be named as 2.1 and 2.2, respectively.
  3213. + Note that the `\-part' switch is effective for only messages
  3214. + containing a multipart content.
  3215. + If a message has some other kind of content,
  3216. + or if the part is itself another multipart content,
  3217. + the `\-part' switch will not prevent the content from being acted upon.
  3218. + A content specification consists of a content type and a subtype.
  3219. + The initial list of \*(lqstandard\*(rq content types and subtypes can be found
  3220. + in RFC 1341.
  3221. + .ne 18
  3222. + A list of commonly used contents is briefly reproduced here:
  3223. + .sp
  3224. + .nf
  3225. + .in +.5i
  3226. + .ta \w'application  'u
  3227. + Type    Subtypes
  3228. + ----    --------
  3229. + text    plain, richtext
  3230. + multipart    mixed, alternative, digest, parallel
  3231. + message    rfc822, partial, external-body
  3232. + application    octet-stream, oda, postscript
  3233. + image    jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd
  3234. + audio    basic
  3235. + video    mpeg
  3236. + .re
  3237. + .in -.5i
  3238. + .fi
  3239. + .sp
  3240. + Subtypes are mandatory.
  3241. + .PP
  3242. + To specify a content,
  3243. + regardless of its subtype,
  3244. + just use the name of the content,
  3245. + e.g.,
  3246. + \*(lqaudio\*(rq.
  3247. + To specify a specific subtype,
  3248. + separate the two with a slash,
  3249. + e.g.,
  3250. + \*(lqaudio/basic\*(rq.
  3251. + Note that regardless of the values given to the `\-type' switch,
  3252. + a multipart content is always acted upon.
  3253. + Further note that if the `\-type' switch is used,
  3254. + and it is desirable to act on a message/external-body content,
  3255. + then the `\-type' switch must be used twice:
  3256. + once for message/external-body and once for the content externally referenced.
  3257. + .Uh "Listing the Contents"
  3258. + The `\-list' switch tells \fImhn\fR to list the table of contents
  3259. + associated with the named messages.
  3260. + The `\-headers' switch indicates that a one-line banner should be
  3261. + displayed above the listing.
  3262. + The `\-realsize' switch tells \fImhn\fR to evaluate the \*(lqnative\*(rq
  3263. + (decoded) format of each content prior to listing.
  3264. + This provides an accurate count at the expense of a small delay.
  3265. + .Uh "Showing the Contents"
  3266. + The `\-show' switch tells \fImhn\fR to display the contents of the named
  3267. + messages.
  3268. + The headers of the message are displayed with the \fImhlproc\fR,
  3269. + using format file \fImhl.headers\fR.
  3270. + (The choice of format file can be overridden by the `\-form\0formfile' switch.)
  3271. + \fImhn\fR will look for information in the user's profile to determine
  3272. + how the different contents should be displayed.
  3273. + This is accomplished by consulting a display string,
  3274. + and executing it under \fB/bin/sh\fR,
  3275. + with the standard input set to the content.
  3276. + .ne 16
  3277. + The display string may contain these escapes:
  3278. + .sp
  3279. + .nf
  3280. + .in +.5i
  3281. + .ta \w'%F  'u
  3282. + %a    additional arguments
  3283. + %e    exclusive execution
  3284. + %f    filename containing content
  3285. + %F    %e, %f, and stdin is terminal not content
  3286. + %l    display listing prior to displaying content
  3287. + %p    %l, and ask for confirmation
  3288. + %s    subtype
  3289. + .re
  3290. + .in -.5i
  3291. + .fi
  3292. + .sp
  3293. + For those display strings containing the e- or F-escape,
  3294. + \fImhn\fR will execute at most one of these at any given time.
  3295. + Although the F-escape expands to be the filename containing the content,
  3296. + the e-escape has no expansion as far as the shell is concerned.
  3297. + When the p-escape prompts for confirmation,
  3298. + typing INTR (usually control-C) will tell \fImhn\fR not to display
  3299. + that content.
  3300. + Further,
  3301. + when \fImhn\fR is display a content,
  3302. + typing QUIT (usually control-\\) will tell \fImhn\fR to wrap things up
  3303. + immediately.
  3304. + First,
  3305. + \fImhn\fR will look for an entry of the form:
  3306. + .sp
  3307. + .in +.5i
  3308. + mhn-show-<type>/<subtype>
  3309. + .in -.5i
  3310. + .sp
  3311. + to determine the command to use to display the content.
  3312. + If this isn't found,
  3313. + \fImhn\fR will look for an entry of the form:
  3314. + .sp
  3315. + .in +.5i
  3316. + mhn-show-<type>
  3317. + .in -.5i
  3318. + .sp
  3319. + to determine the display command.
  3320. + .ne 10
  3321. + If this isn't found,
  3322. + \fImhn\fR has two default values:
  3323. + .sp
  3324. + .nf
  3325. + .in +.5i
  3326. + mhn-show-text/plain: %pmoreproc '%F'
  3327. + mhn-show-message/rfc822: %pshow -file '%F'
  3328. + .in -.5i
  3329. + .fi
  3330. + .sp
  3331. + If neither apply,
  3332. + \fImhn\fR will check to see if the message has a application/octet-stream
  3333. + content with parameter \*(lqtype=tar\*(rq.
  3334. + If so,
  3335. + \fImhn\fR will use an appropriate command.
  3336. + If not,
  3337. + \fImhn\fR will complain.
  3338. + .ne 10
  3339. + Example entries might be:
  3340. + .sp
  3341. + .nf
  3342. + .in +.5i
  3343. + mhn-show-audio/basic: raw2audio 2>/dev/null | play
  3344. + mhn-show-image: xv '%f'
  3345. + mhn-show-application/PostScript: lpr -Pps
  3346. + .in -.5i
  3347. + .fi
  3348. + .sp
  3349. + Note that when using the f- or F-escape,
  3350. + it's a good idea to use single-quotes around the escape.
  3351. + This prevents misinterpretation by the shell of any funny characters
  3352. + that might be present in the filename.
  3353. + Because the text content might be in a non-ASCII character set,
  3354. + when \fImhn\fR encounters a \*(lqcharset\*(rq parameter for this content,
  3355. + it checks to see whether the environment variable $MM_CHARSET is set
  3356. + and whether the value of this environment variable is equal to the value of
  3357. + the charset parameter.
  3358. + If not,
  3359. + then
  3360. + \fImhn\fR will look for an entry of the form:
  3361. + .sp
  3362. + .in +.5i
  3363. + mhn-charset-<charset>
  3364. + .in -.5i
  3365. + .sp
  3366. + which should contain a command creating an environment to render the
  3367. + character set.
  3368. + This command string should containing a single \*(lq%s\*(rq,
  3369. + which will be filled-in with the command to display the content.
  3370. + An example entry might be:
  3371. + .sp
  3372. + .in +.5i
  3373. + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
  3374. + .in -.5i
  3375. + .sp
  3376. + Note that many pagination programs strip off the high-order bit.
  3377. + However,
  3378. + newer releases of the \fIless\fR program have modest support for
  3379. + single-octet character sets.
  3380. + The source to \fIless\fR version 177,
  3381. + which has such support,
  3382. + is found in the MH source tree under \fBmiscellany/less-177\fR.
  3383. + In order to view messages sent in the ISO 8859/1 character set using
  3384. + \fIless\fR,
  3385. + .ne 9
  3386. + put these lines in your \&.login file:
  3387. + .sp
  3388. + .nf
  3389. + .in +.5i
  3390. + setenv LESSCHARSET latin1
  3391. + setenv LESS "-f"
  3392. + .in -.5i
  3393. + .fi
  3394. + .sp
  3395. + The first line tells \fIless\fR to use 8859/1 definition for determing
  3396. + whether a character is \*(lqnormal\*(rq, \*(lqcontrol\*(lq, or
  3397. + \*(lqbinary\*(rq.
  3398. + The second line tells \fIless\fR not to warn you if it encounters a
  3399. + file that has non-ASCII characters.
  3400. + Then,
  3401. + simply set the \fBmoreproc\fR profile entry to \fIless\fR,
  3402. + and it will get called automatically.
  3403. + (To handle other single-octet character sets,
  3404. + look at the \fIless\fR\0(1) manual entry for information about the
  3405. + \fBLESSCHARDEF\fR environment variable.)
  3406. + Finally,
  3407. + \fImhn\fR will process each message serially\0--\0it won't start showing
  3408. + the next message until all the commands executed to display the
  3409. + current message have terminated.
  3410. + In the case of a multipart content,
  3411. + the content contains advice indicating if the parts should be
  3412. + displayed serially or in parallel.
  3413. + Because this may cause confusion,
  3414. + particularly on uni-window displays,
  3415. + the `\-serialonly' switch can be given to tell \fImhn\fR to never
  3416. + display parts in parallel.
  3417. + .Uh "Storing the Contents"
  3418. + The `\-store' switch tells \fImhn\fR to store the contents of the
  3419. + named messages in \*(lqnative\*(rq (decoded) format.
  3420. + Two things must be determined:
  3421. + the directory to store the content,
  3422. + and the filenames.
  3423. + Files are written in the directory given by the \fBmhn-storage\fR
  3424. + profile entry,
  3425. + e.g.,
  3426. + .sp
  3427. + .in +.5i
  3428. + mhn-storage: /tmp
  3429. + .in -.5i
  3430. + .sp
  3431. + If this entry isn't present,
  3432. + the current working directory is used.
  3433. + \fImhn\fR will look for information in the user's profile to determine
  3434. + how the different contents should be stored.
  3435. + This is achieved through the use of a formatting string,
  3436. + .ne 13
  3437. + which may contain these escapes:
  3438. + .sp
  3439. + .nf
  3440. + .in +.5i
  3441. + .ta \w'%P  'u
  3442. + %m    message number
  3443. + %P    .part
  3444. + %p    part
  3445. + %s    subtype
  3446. + .re
  3447. + .in -.5i
  3448. + .fi
  3449. + .sp
  3450. + If the content isn't part of a multipart content,
  3451. + the p-escapes are ignored.
  3452. + Note that if the formatting string starts with a \*(lq+\*(rq character,
  3453. + then these escapes are ignored,
  3454. + and the content is stored in the named folder.
  3455. + (A formatting string consisting solely of a \*(lq+\*(rq character
  3456. + indicates the current folder.)
  3457. + Further,
  3458. + a formatting string consisting solely of a \*(lq-\*(rq character
  3459. + indicates the standard-output.
  3460. + First,
  3461. + \fImhn\fR will look for an entry of the form:
  3462. + .sp
  3463. + .in +.5i
  3464. + mhn-store-<type>/<subtype>
  3465. + .in -.5i
  3466. + .sp
  3467. + to determine the formatting string.
  3468. + If this isn't found,
  3469. + \fImhn\fR will look for an entry of the form:
  3470. + .sp
  3471. + .in +.5i
  3472. + mhn-store-<type>
  3473. + .in -.5i
  3474. + .sp
  3475. + to determine the formatting string.
  3476. + If this isn't found,
  3477. + \fImhn\fR will check to see if the content is application/octet-stream
  3478. + with parameter \*(lqtype=tar\*(rq.
  3479. + If so,
  3480. + \fImhn\fR will choose an appropriate filename.
  3481. + If the content is not application/octet-stream,
  3482. + then \fImhn\fR will check to see if the content is a message.
  3483. + If so,
  3484. + \fImhn\fR will use the value \*(lq+\*(rq.
  3485. + If not,
  3486. + \fImhn\fR will use the value \*(lq%m%P.%s\*(rq.
  3487. + Note that if the formatting string starts with a '/',
  3488. + then content will be stored in the full path given
  3489. + (rather than using the value of \fBmhn-storage\fR or the current working
  3490. + directory.)
  3491. + Similarly,
  3492. + if the formatting string starts with a '|',
  3493. + then \fImhn\fR will execute a command which should ultimately store
  3494. + the content.
  3495. + Note that before executing the command,
  3496. + \fImhn\fR will change to the appropriate directory.
  3497. + Also note that if the formatting string starts with a '|',
  3498. + then \fImhn\fR will also honor the a-escape when processing the
  3499. + formatting string.
  3500. + .ne 10
  3501. + Example entries might be:
  3502. + .sp
  3503. + .nf
  3504. + .in +.5i
  3505. + mhn-store-text: %m%P.txt
  3506. + mhn-store-audio/basic: | raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
  3507. + mhn-store-application/PostScript: %m%P.ps
  3508. + .in -.5i
  3509. + .fi
  3510. + .sp
  3511. + Further,
  3512. + note that when asked to store a content containing a partial message,
  3513. + \fImhn\fR will try to locate all of the portions and combine them accordingly.
  3514. + Thus,
  3515. + if someone's sent you a message in several parts,
  3516. + you might put them all in their own folder and do:
  3517. + .sp
  3518. + .in +.5i
  3519. + mhn all -store
  3520. + .in -.5i
  3521. + .sp
  3522. + This will store exactly one message,
  3523. + containing the sum of the parts.
  3524. + Note that if \fImhn\fR can not locate each part,
  3525. + it will not store anything.
  3526. + Finally,
  3527. + if the `\-auto' switch is given and the content contains information
  3528. + indicating the filename the content should be stored as
  3529. + (and if the filename doesn't begin with a '/'),
  3530. + then the filename from the content will be used instead.
  3531. + .Uh "External Access"
  3532. + For contents of type message/external-body,
  3533. + .ne 12
  3534. + \fImhn\fR supports these access-types:
  3535. + .sp
  3536. + .nf
  3537. + .in +.5i
  3538. + afs
  3539. + anon-ftp
  3540. + ftp
  3541. + local-file
  3542. + mail-server
  3543. + .in -.5i
  3544. + .fi
  3545. + .sp
  3546. + If your system supports a SOCKETs interface to TCP/IP,
  3547. + then \fImhn\fR will use a built-in FTP client.
  3548. + Otherwise,
  3549. + \fImhn\fR will look for the \fBmhn-access-ftp\fR profile entry,
  3550. + e.g.,
  3551. + .sp
  3552. + .in +.5i
  3553. + mhn-access-ftp: myftp.sh
  3554. + .in -.5i
  3555. + .sp
  3556. + to determine the pathname of a program to perform the FTP retrieval.
  3557. + .ne 14
  3558. + This program is invoked with these arguments:
  3559. + .sp
  3560. + .nf
  3561. + .in +.5i
  3562. + domain name of FTP-site
  3563. + username
  3564. + password
  3565. + remote directory
  3566. + remote filename
  3567. + local filename
  3568. + \*(lqascii\*(rq or \*(lqbinary\*(rq
  3569. + .in -.5i
  3570. + .fi
  3571. + .sp
  3572. + The program should terminate with a zero-valued exit-status if the
  3573. + retrieval is success.
  3574. + .Uh "The Content Cache"
  3575. + When \fImhn\fR encounters an external content containing a
  3576. + \*(lqContent-ID:\*(rq field,
  3577. + and if the content allows caching,
  3578. + then \fImhn\fR looks for the profile entry \fBmhn-cache\fR to
  3579. + determine if the content should be read from/written to a cache.
  3580. + Any content written to the cache will,
  3581. + by default,
  3582. + be world-readable.
  3583. + (To prevent this,
  3584. + use a directory name with the desired read and execute permissions.)
  3585. + The \fBmhn-cache\fR profile entry names the directory used for caching,
  3586. + e.g.,
  3587. + .sp
  3588. + .in +.5i
  3589. + mhn-cache: /tmp
  3590. + .in -.5i
  3591. + .sp
  3592. + might be used if you didn't care that the cache got wiped after each reboot
  3593. + of the system.
  3594. + .Uh "Composing the Contents"
  3595. + The \fImhn\fR program can also be used as a simple editor to aid in
  3596. + composing multi-media messages.
  3597. + When invoked by a \fIwhatnow\fR program,
  3598. + \fImhn\fR will expect the body of the draft to be formatted as an
  3599. + \*(lq\fImhn\fR composition file.\*(rq
  3600. + .ne 54
  3601. + The syntax of this is straight-forward:
  3602. + .sp
  3603. + .nf
  3604. + .in +.5i
  3605. +    body         ::=     1*(content | EOL)
  3606. +    content      ::=     directive | plaintext
  3607. +    directive    ::=     "#" type "/" subtype
  3608. +                             0*(";" attribute "=" value)
  3609. +                             [ "(" comment ")" ]
  3610. +                             [ "[" description "]" ]
  3611. +                             [ filename ]
  3612. +                             EOL
  3613. +                       | "#@" type "/" subtype
  3614. +                             0*(";" attribute "=" value)
  3615. +                             [ "(" comment ")" ]
  3616. +                             [ "[" description "]" ]
  3617. +                             external-parameters
  3618. +                             EOL
  3619. +                       | "#forw"
  3620. +                             [ "[" description "]" ]
  3621. +                             [ "+"folder ] [ 0*msg ]
  3622. +                             EOL
  3623. +                       | "#begin"
  3624. +                               [ "[" description "]" ]
  3625. +                               [   "alternative"
  3626. +                                 | "parallel"    ]
  3627. +                               EOL
  3628. +                             1*body
  3629. +                         "#end" EOL
  3630. +    plaintext    ::=     [ "Content-Description:"
  3631. +                               description EOL EOL ]
  3632. +                             1*line
  3633. +                         [ "#" EOL ]
  3634. +                       | "#<" type "/" subtype
  3635. +                             0*(";" attribute "=" value)
  3636. +                             [ "(" comment ")" ]
  3637. +                             [ "[" description "]" ]
  3638. +                             EOL
  3639. +                             1*line
  3640. +                         [ "#" EOL ]
  3641. +    line         ::=     "##" text EOL
  3642. +                         -- interpreted as "#"text EOL
  3643. +                       | text EOL
  3644. + .in -.5i
  3645. + .fi
  3646. + .sp
  3647. + Basically,
  3648. + the body contains one or more contents.
  3649. + A content consists of either a directive,
  3650. + indicated with a \*(lq#\*(rq as the first character of a line;
  3651. + or,
  3652. + plaintext (one or more lines of text).
  3653. + The continuation character, \*(lq\\\*(lq, may be used to enter a single
  3654. + .ne 11
  3655. + directive on more than one line,
  3656. + e.g.,
  3657. + .sp
  3658. + .nf
  3659. + .in +.5i
  3660. + #@application/octet-stream; \\
  3661. +     type=tar; \\
  3662. +     conversions=x-compress
  3663. + .in -.5i
  3664. + .fi
  3665. + .sp
  3666. + There are four kinds of directives:
  3667. + \*(lqtype\*(rq directives,
  3668. + which name the type and subtype of the content;
  3669. + \*(lqexternal-type\*(rq directives,
  3670. + which also name the type and subtype of the content;
  3671. + the \*(lqforw\*(rq directive,
  3672. + which is used to forward a digest of messages;
  3673. + and,
  3674. + the \*(lqbegin\*(rq directive,
  3675. + which is used to create a multipart content.
  3676. + For the type directives,
  3677. + the user may optionally specify the name of a file containing the
  3678. + contents in \*(lqnative\*(rq (decoded) format.
  3679. + (If the filename starts with the \*(lq|\*(rq character,
  3680. + then this gives a command whose output is captured accordingly.)
  3681. + If a filename is not given,
  3682. + \fImhn\fR will look for information in the user's profile to determine
  3683. + how the different contents should be composed.
  3684. + This is accomplished by consulting a composition string,
  3685. + and executing it under \fB/bin/sh\fR,
  3686. + with the standard output set to the content.
  3687. + .ne 13
  3688. + The composition string may contain these escapes:
  3689. + .sp
  3690. + .nf
  3691. + .in +.5i
  3692. + .ta \w'%P  'u
  3693. + %a    additional arguments
  3694. + %f    filename containing content
  3695. + %F    %f, and stdout is not re-directed
  3696. + %s    subtype
  3697. + .re
  3698. + .in -.5i
  3699. + .fi
  3700. + .sp
  3701. + First,
  3702. + \fImhn\fR will look for an entry of the form:
  3703. + .sp
  3704. + .in +.5i
  3705. + mhn-compose-<type>/<subtype>
  3706. + .in -.5i
  3707. + .sp
  3708. + to determine the command to use to compose the content.
  3709. + If this isn't found,
  3710. + \fImhn\fR will look for an entry of the form:
  3711. + .sp
  3712. + .in +.5i
  3713. + mhn-compose-<type>
  3714. + .in -.5i
  3715. + .sp
  3716. + to determine the composition command.
  3717. + If this isn't found,
  3718. + \fImhn\fR will complain.
  3719. + An example entry might be:
  3720. + .sp
  3721. + .in +.5i
  3722. + mhn-compose-audio/basic: record | raw2audio -F
  3723. + .in -.5i
  3724. + .sp
  3725. + Because commands like these will vary,
  3726. + depending on the display environment used for login,
  3727. + composition strings for different contents should probably be put in
  3728. + the file specified by the \fB$MHN\fR environment variable,
  3729. + instead of directly in your user profile.
  3730. + The external-type directives are used to provide a reference to a content,
  3731. + rather than enclosing the contents itself.
  3732. + Hence,
  3733. + instead of providing a filename as with the type directives,
  3734. + external-parameters are supplied.
  3735. + These look like regular parameters,
  3736. + .ne 15
  3737. + so they must be separated accordingly,
  3738. + e.g.,
  3739. + .sp
  3740. + .nf
  3741. + .in +.5i
  3742. + #@application/octet-stream; \\
  3743. +     type=tar; \\
  3744. +     conversions=x-compress [] \\
  3745. +     access-type=anon-ftp; \\
  3746. +     name="mh-mime.tar.Z"; \\
  3747. +     directory="mrose/mh-mime"; \\
  3748. +     site="ftp.ics.uci.edu"
  3749. + .in -.5i
  3750. + .fi
  3751. + .sp
  3752. + By specifying \*(lq[]\*(rq,
  3753. + an empty description string is given,
  3754. + and the start of the external-parameters is identified.
  3755. + .ne 16
  3756. + These parameters are of the form:
  3757. + .sp
  3758. + .nf
  3759. + .in +.5i
  3760. + .ta \w'access-type=  'u
  3761. + access-type=    usually \fIanon-ftp\fR or \fImail-server\fR
  3762. + name=    filename
  3763. + directory=    directoryname (optional)
  3764. + site=    hostname
  3765. + mode=    usually \fIascii\fR or \fIimage\fR (optional)
  3766. + server=    mailbox
  3767. + body=    command to send for retrieval
  3768. + .re
  3769. + .in -.5i
  3770. + .fi
  3771. + .sp
  3772. + For the forw directive,
  3773. + the user may optionally specify the name of the folder and which
  3774. + messages are to be forwarded.
  3775. + if a folder is not given,
  3776. + it defaults to the current folder.
  3777. + Similarly,
  3778. + if a message is not given,
  3779. + it defaults to the current message.
  3780. + Hence,
  3781. + the forw directive is similar to the \fIforw\fR\0(1) command,
  3782. + except that the former uses the MIME rules for encapsulation
  3783. + rather than those specified in RFC 934.
  3784. + Usage of the `\-rfc934mode' switch indicates whether \fImhn\fR should
  3785. + attempt to utilize the encapsulation rules in such a way as to appear
  3786. + that RFC 934 is being used.
  3787. + If given,
  3788. + then RFC 934-compliant user-agents should be able to burst the message on
  3789. + reception\0--\0providing that the messages being encapsulated do not
  3790. + contain encapsulated messages themselves.
  3791. + The drawback of this approach is that the encapsulations are generated
  3792. + by placing an extra newline at the end of the body of each message.
  3793. + For the begin directive,
  3794. + the user must specify at least one content between
  3795. + the begin and end pairs.
  3796. + For all of these directives,
  3797. + the user may include a brief description of the content between
  3798. + the \*(lq[\*(rq character and the \*(lq]\*(rq character.
  3799. + Putting this all together,
  3800. + .ne 15
  3801. + here is a brief example of what a user's components file might look like:
  3802. + .sp
  3803. + .nf
  3804. + .in +.5i
  3805. + To:
  3806. + cc:
  3807. + Subject:
  3808. + --------
  3809. + #audio/basic [Flint phone]  \\
  3810. +     |raw2audio -F < /home/mrose/lib/multi-media/flint.au
  3811. + #image/gif   [MTR's photo] \\
  3812. +                     /home/mrose/lib/multi-media/mrose.gif
  3813. + .in -.5i
  3814. + .fi
  3815. + .sp
  3816. + For a later example,
  3817. + we'll call this components file \fImhncomps\fR.
  3818. + As noted earlier,
  3819. + in addition to directives,
  3820. + plaintext can be present.
  3821. + Plaintext is gathered,
  3822. + until a directive is found or the draft is exhausted,
  3823. + and this is made to form a text content.
  3824. + If the plaintext must contain a \*(lq#\*(rq at the beginning of a line,
  3825. + simply double it,
  3826. + e.g.,
  3827. + .sp
  3828. + .in +.5i
  3829. + ##when sent, this line will start with only one #
  3830. + .in -.5i
  3831. + .sp
  3832. + If you want to end the plaintext prior to a directive,
  3833. + e.g.,
  3834. + to have two plaintext contents adjacent,
  3835. + simply insert a line containing a single \*(lq#\*(rq character,
  3836. + .ne 10
  3837. + e.g.,
  3838. + .sp
  3839. + .nf
  3840. + .in +.5i
  3841. + this is the first content
  3842. + #
  3843. + and this is the second
  3844. + .in -.5i
  3845. + .fi
  3846. + .sp
  3847. + Finally,
  3848. + if the plaintext starts with a line of the form:
  3849. + .sp
  3850. + .in +.5i
  3851. + Content-Description: text
  3852. + .in -.5i
  3853. + .sp
  3854. + then this will be used to describe the plaintext content.
  3855. + \fBNOTE WELL:\fR you must follow this line with a blank line before
  3856. + starting your text.
  3857. + By default,
  3858. + plaintext is captured as a text/plain content.
  3859. + You can override this by starting the plaintext with \*(lq#<\*(rq
  3860. + followed by a content-type specification,
  3861. + .ne 11
  3862. + e.g.,
  3863. + .sp
  3864. + .nf
  3865. + .in +.5i
  3866. + #<text/richtext
  3867. + this content will be tagged as text/richtext
  3868. + #
  3869. + and this content will be tagged as text/plain
  3870. + .in -.5i
  3871. + .fi
  3872. + .sp
  3873. + Note that if you use the \*(lq#<\*(rq plaintext-form,
  3874. + then the content-description must be on the same line which identifies
  3875. + the content type of the plaintext.
  3876. + If \fImhn\fR is successful,
  3877. + it renames the original draft to start with the \*(lq,\*(rq character
  3878. + and end with the string \*(lq.orig\*(rq,
  3879. + e.g.,
  3880. + if you are editing the file \*(lqdraft\*(rq,
  3881. + it will be renamed to \*(lq,draft.orig\*(rq.
  3882. + This allows you to easily recover the \fImhn\fR composition file.
  3883. + .Uh "Automatic Composition"
  3884. + Note that MH will not invoke \fImhn\fR automatically,
  3885. + unless you add this line to your \&.mh\(ruprofile file:
  3886. + .sp
  3887. + .in +.5i
  3888. + automhnproc: mhn
  3889. + .in -.5i
  3890. + .sp
  3891. + Otherwise,
  3892. + you must specifically give the command
  3893. + .sp
  3894. + .in +.5i
  3895. + What now? edit mhn
  3896. + .in -.5i
  3897. + .sp
  3898. + prior to sending the draft.
  3899. + You can easily tailor MH to help you remember to do this.
  3900. + .ne 10
  3901. + Suppose you have these lines in your profile:
  3902. + .sp
  3903. + .nf
  3904. + .in +.5i
  3905. + mcomp:          -editor mprompter -form mhncomps
  3906. + mprompter:      -noprepend -norapid
  3907. + mprompter-next: mhn
  3908. + .in -.5i
  3909. + .fi
  3910. + .sp
  3911. + where \fImcomp\fR is a link to \fIcomp\fR\0(1),
  3912. + and \fImprompter\fR is a link to \fIprompter\fR\0(1).
  3913. + Then to send a message using the \fImhncomps\fR components file above,
  3914. + .ne 26
  3915. + the sequence is:
  3916. + .sp
  3917. + .nf
  3918. + .in +.5i
  3919. + % \fBmcomp\fR
  3920. + To: \fBuser@host\fR
  3921. + cc:
  3922. + Subject: \fBmulti-media message\fR
  3923. + --------
  3924. + #audio/basic [Flint phone]  \\
  3925. +     |raw2audio -F < /home/mrose/lib/multi-media/flint.au
  3926. + #image/gif   [MTR's photo] \\
  3927. +                     /home/mrose/lib/multi-media/mrose.gif
  3928. + --------Enter additional text
  3929. + \fBThis message contains three contents.\fR
  3930. + \fB<CTRL-D>\fR
  3931. + --------
  3932. + What now? \fBedit\fR (this invokes \fImhn\fR)
  3933. + What now? \fBsend\fR
  3934. + .in -.5i
  3935. + .fi
  3936. + .sp
  3937. + You have to remember to type the additional edit command,
  3938. + but it should be fairly obvious from the interaction.
  3939. + Finally,
  3940. + you should consider adding this line to your profile:
  3941. + .sp
  3942. + .in +.5i
  3943. + lproc: show
  3944. + .in -.5i
  3945. + .sp
  3946. + This way,
  3947. + if you decide to \fBlist\fR after invoking \fImhn\fR as your editor,
  3948. + the command
  3949. + .sp
  3950. + .in +.5i
  3951. + What now? list
  3952. + .in -.5i
  3953. + .sp
  3954. + will work as you expect.
  3955. + .Uh "Sending Files via Mail"
  3956. + When you want to send a bunch of files to someone,
  3957. + you can run the \fIviamail\fR shell script,
  3958. + which is similar the tarmail command:
  3959. + .sp
  3960. + .in +.5i
  3961. + @(MHETCPATH)/viamail mailpath \*(lqsubject\*(rq files\0...
  3962. + .in -.5i
  3963. + .sp
  3964. + \fIviamail\fR will archive the directories/files you name with \fItar\fR\0(1),
  3965. + and then mail the compressed archive to the `mailpath' with the given
  3966. + `subject'.
  3967. + The archive will be automatically split up into as many messages as
  3968. + necessary in order to get past most mailers.
  3969. + Sometimes you want \fIviamail\fR to pause after posting a partial message.
  3970. + This is usually the case when you are running \fIsendmail\fR and
  3971. + expect to generate a lot of partial messages.
  3972. + If the first argument given to \fIviamail\fR starts with a dash,
  3973. + then it is interpreted as the number of seconds to pause in between postings,
  3974. + e.g.,
  3975. + .sp
  3976. + .in +.5i
  3977. + @(MHETCPATH)/viamail -300 mailpath \*(lqsubject\*(rq files\0...
  3978. + .in -.5i
  3979. + .sp
  3980. + will pause 5 minutes in between each posting.
  3981. + When these messages are received,
  3982. + invoke \fImhn\fR once,
  3983. + with the list of messages,
  3984. + and the `\-store' command.
  3985. + The \fImhn\fR program will then store exactly one message containing the
  3986. + archive.
  3987. + You can then use `\-show' to find out what's inside;
  3988. + possibly  followed by `\-store' to write the archive to a file where you
  3989. + .ne 26
  3990. + can subsequently uncompress and untar it, e.g.,
  3991. + .sp
  3992. + .nf
  3993. + .in +.5i
  3994. + % mhn -list all
  3995. +  msg part  type/subtype             size description
  3996. +    1       message/partial           47K part 1 of 4
  3997. +    2       message/partial           47K part 2 of 4
  3998. +    3       message/partial           47K part 3 of 4
  3999. +    4       message/partial           18K part 4 of 4
  4000. + % mhn -store all
  4001. + % mhn -list -verbose last
  4002. +  msg part  type/subtype             size description
  4003. +    5       application/octet-stream 118K
  4004. +              (extract with uncompress | tar xvpf -)
  4005. +              type=tar
  4006. +              conversions=x-compress
  4007. + % mhn -show last
  4008. +  msg part  type/subtype             size description
  4009. +    5       application/octet-stream 118K
  4010. + -- headers of message, followed by \fItar\fR listing appears here
  4011. + % mhn -store last
  4012. + % uncompress < 5.tar.Z | tar xvpf -
  4013. + .in -.5i
  4014. + .fi
  4015. + .sp
  4016. + Alternately,
  4017. + by using the `\-auto' switch,
  4018. + \fImhn\fR will automatically do the extraction for you,
  4019. + .ne 26
  4020. + e.g.,
  4021. + .sp
  4022. + .nf
  4023. + .in +.5i
  4024. + % mhn -list all
  4025. +  msg part  type/subtype             size description
  4026. +    1       message/partial           47K part 1 of 4
  4027. +    2       message/partial           47K part 2 of 4
  4028. +    3       message/partial           47K part 3 of 4
  4029. +    4       message/partial           18K part 4 of 4
  4030. + % mhn -store all
  4031. + % mhn -list -verbose last
  4032. +  msg part  type/subtype             size description
  4033. +    5       application/octet-stream 118K
  4034. +              (extract with uncompress | tar xvpf -)
  4035. +              type=tar
  4036. +              conversions=x-compress
  4037. + % mhn -show last
  4038. +  msg part  type/subtype             size description
  4039. +    5       application/octet-stream 118K
  4040. + -- headers of message, followed by \fItar\fR listing appears here
  4041. + % mhn -store -auto last
  4042. + -- \fItar\fR listing appears here as files are extracted
  4043. + .in -.5i
  4044. + .fi
  4045. + .sp
  4046. + As the second \fItar\fR listing is generated,
  4047. + the files are extracted.
  4048. + A prudent user will never put `\-auto' in the \&.mh\(ruprofile file.
  4049. + The correct procedure is to first use `\-show',
  4050. + to find out what will be extracted.
  4051. + Then \fImhn\fR can be invoked with  `\-store' and `\-auto' to perform
  4052. + the extraction.
  4053. + .Uh "User Environment"
  4054. + Because the display environment in which \fImhn\fR operates may vary
  4055. + for a user,
  4056. + \fImhn\fR will look for the environment variable \fB$MHN\fR.
  4057. + If present,
  4058. + this specifies the name of an additional user profile which should be read.
  4059. + Hence,
  4060. + when a user logs in on a particular display device,
  4061. + this environment variable should be set to refer to a file containing
  4062. + definitions useful for the display device.
  4063. + Normally,
  4064. + only entries of the form
  4065. + .sp
  4066. + .in +.5i
  4067. + mhn-show-<type>/<subtype>
  4068. + .br
  4069. + mhn-show-<type>
  4070. + .in -.5i
  4071. + .sp
  4072. + need be present.
  4073. + Finally,
  4074. + \fImhn\fR will attempt to consult one other additional user profile,
  4075. + e.g.,
  4076. + .sp
  4077. + .in +.5i
  4078. + @(MHETCPATH)/mhn_defaults
  4079. + .in -.5i
  4080. + .sp
  4081. + which is created automatically during MH installation.
  4082. + .Fi
  4083. + ^$HOME/\&.mh\(ruprofile~^The user profile
  4084. + ^$MHN~^Additional profile entries
  4085. + ^@(MHETCPATH)/mhn_defaults~^System-default profile entries
  4086. + ^@(MHETCPATH)/mhl.headers~^The headers template
  4087. + .Pr
  4088. + ^Path:~^To determine the user's MH directory
  4089. + .Ps
  4090. + ^Current\-Folder:~^To find the default current folder
  4091. + .Ps
  4092. + ^mhlproc:~^Default program to display message headers
  4093. + .Ps
  4094. + ^mhn-access-ftp:~^Program to retrieve contents via FTP
  4095. + .Ps
  4096. + ^mhn-cache~^Directory to store cached external contents
  4097. + .Ps
  4098. + ^mhn-charset-<charset>~^Template for environment to render character sets
  4099. + .Ps
  4100. + ^mhn-compose-<type>*~^Template for composing contents
  4101. + .Ps
  4102. + ^mhn-show-<type>*~^Template for displaying contents
  4103. + .Ps
  4104. + ^mhn-storage~^Directory to store contents
  4105. + .Ps
  4106. + ^mhn-store-<type>*~^Template for storing contents
  4107. + .Ps
  4108. + ^moreproc:~^Default program to display text/plain content
  4109. + .Sa
  4110. + mhl(1)
  4111. + .br
  4112. + \fIMIME: Mechanisms for Specifying and Describing the Format of
  4113. + Internet Message Bodies\fR
  4114. + (RFC 1341),
  4115. + .br
  4116. + \fIProposed Standard for Message Encapsulation\fR
  4117. + (RFC 934).
  4118. + .De
  4119. + `+folder' defaults to the current folder
  4120. + .Ds
  4121. + `\-noauto'
  4122. + .Ds
  4123. + `\-noebcdicsafe'
  4124. + .Ds
  4125. + `\-form\0mhl.headers'
  4126. + .Ds
  4127. + `\-headers'
  4128. + .Ds
  4129. + `\-realsize'
  4130. + .Ds
  4131. + `\-rfc934mode'
  4132. + .Ds
  4133. + `\-noserialonly'
  4134. + .Ds
  4135. + `\-show'
  4136. + .Ds
  4137. + `\-noverbose'
  4138. + .Co
  4139. + If a folder is given,
  4140. + it will become the current folder.
  4141. + The last message selected will become the current message.
  4142. + .Bu
  4143. + Partial messages contained within a multipart content are not reassembled
  4144. + with the `\-store' switch.
  4145. + .En
  4146. *** ../mh-6.7.2/conf/doc/mhook.rf    Thu Apr  5 22:18:47 1990
  4147. --- conf/doc/mhook.rf    Thu Oct 29 14:03:51 1992
  4148. ***************
  4149. *** 1,3 ****
  4150.   .\"    @(MHWARNING)
  4151. ! .\" @(#)$Id: mhook.rf,v 1.8 90/04/05 22:18:43 sources Exp $
  4152.   .SC MHOOK 1
  4153. --- 1,3 ----
  4154.   .\"    @(MHWARNING)
  4155. ! .\" @(#)$Id: mhook.rf,v 1.15 1992/10/29 22:03:44 jromine Exp $
  4156.   .SC MHOOK 1
  4157. ***************
  4158. *** 4,25 ****
  4159.   .NA
  4160. ! mhook \- MH receive\-mail hooks
  4161.   .SY
  4162. ! $HOME/\&.maildelivery
  4163. ! @BEGIN: MHMTS
  4164. ! .ds SL \fIpost\fR
  4165. ! .ds ZS slocal
  4166. ! @END: MHMTS
  4167. ! @BEGIN: MMDFIMTS
  4168. ! .ds SL \fIslocal\fR
  4169. ! .ds ZS slocal
  4170. ! @END: MMDFIMTS
  4171. ! @BEGIN: MMDFIIMTS
  4172. ! .ds SL the local channel
  4173. ! .ds ZS mmdfII
  4174. ! @END: MMDFIIMTS
  4175. ! @BEGIN: SENDMTS
  4176. ! .ds SL \fIslocal\fR
  4177. ! .ds ZS slocal
  4178. ! @END: SENDMTS
  4179.   .ti .5i
  4180. --- 4,8 ----
  4181.   .NA
  4182. ! mhook, rcvdist, rcvpack, rcvtty  \- MH receive-mail hooks
  4183.   .SY
  4184. ! .na
  4185.   .ti .5i
  4186. ***************
  4187. *** 45,46 ****
  4188. --- 28,30 ----
  4189.   \%[\-help]
  4190. + .ad
  4191.   .DE
  4192. ***************
  4193. *** 49,287 ****
  4194.   You do \fBNOT\fR invoke the hook yourself,
  4195. ! @BEGIN: MHMTS
  4196. ! rather the hook is invoked on your behalf by \fIMH\fR.
  4197. ! @END: MHMTS
  4198. ! @BEGIN: MMDFIMTS
  4199. ! rather the hook is invoked on your behalf by \fIMMDF\fR
  4200. ! when you (symbolically) link @(MHETCPATH)/slocal to the file
  4201. ! bin/rcvmail in your home directory.
  4202. ! @END: MMDFIMTS
  4203. ! @BEGIN: MMDFIIMTS
  4204. ! rather the hook is invoked on your behalf by \fIMMDF\fR.
  4205. ! @END: MMDFIIMTS
  4206. ! @BEGIN: SENDMTS
  4207. ! rather the hook is invoked on your behalf by \fISendMail\fR,
  4208. ! when you include the line
  4209. ! .nf
  4210. ! .in +.5i
  4211. !     \*(lq| @(MHETCPATH)/slocal -user $USER\*(rq
  4212. ! .in -.5i
  4213. ! .fi
  4214. ! in your \&.forward file in your home directory.
  4215. ! @END: SENDMTS
  4216.   
  4217. ! The \fI\&.maildelivery\fR file,
  4218. ! which is an ordinary ASCII file,
  4219. ! controls how local delivery is performed.
  4220. ! This file is read by \*(SL.
  4221. ! .if '\*(ZS'slocal' \{\
  4222. ! The format of each line in the \fI\&.maildelivery\fR file is
  4223. ! .ti +.5i
  4224. ! \fBfield pattern action result string\fR
  4225. ! where
  4226. ! .in +.5i
  4227. ! .ti -.25i
  4228. ! \fBfield\fR:
  4229. ! .br
  4230. ! The name of a field that is to be searched for a pattern.
  4231. ! This is any field in the headers of the message that might be present.
  4232. ! In addition, the following special fields are also defined:
  4233. ! .in +.25i
  4234. ! \fIsource\fR: the out\-of\-band sender information
  4235. ! .br
  4236. ! \fIaddr\fR: the address that was used to cause delivery to the recipient
  4237. ! .br
  4238. ! \fIdefault\fR: this matches \fIonly\fR if the message hasn't been delivered yet
  4239. ! .br
  4240. ! \fI*\fR: this always matches
  4241. ! .in -.25i
  4242. ! .ti -.25i
  4243. ! \fBpattern\fR:
  4244. ! .br
  4245. ! The sequence of characters to match in the specified field.
  4246. ! Matching is case\-insensitive but not RE\-based.
  4247. ! .ti -.25i
  4248. ! \fBaction\fR:
  4249. ! .br
  4250. ! The action to take to deliver the message.
  4251. ! This is one of
  4252. ! .in +.5i
  4253. ! .ti -.5i
  4254. ! \fIfile\fR or \fI>\fR:
  4255. ! .br
  4256. ! Append the message to the file named by \fBstring\fR.
  4257. ! The standard maildrop delivery process is used.
  4258. ! If the message can be appended to the file,
  4259. ! then this action succeeds.
  4260. ! When writing to the file,
  4261. ! a new field is added:
  4262. ! .ti +.5i
  4263. ! Delivery\-Date:\ date
  4264. ! which indicates the date and time that message was appended to the file.
  4265. ! .ti -.5i
  4266. ! \fIpipe\fR or \fI|\fR:
  4267. ! .br
  4268. ! Pipe the message as the standard input to the command named by \fBstring\fR,
  4269. ! using the Bourne shell \fIsh\fR\0(1) to interpret the string.
  4270. ! Prior to giving the string to the shell,
  4271. ! it is expanded with the following built\-in variables:
  4272. ! .in +.25i
  4273. ! $(sender): the return address for the message
  4274. ! .br
  4275. ! $(address): the address that was used to cause delivery to the recipient
  4276. ! .br
  4277. ! $(size): the size of the message in bytes
  4278. ! .br
  4279. ! $(reply\-to): either the \*(lqReply\-To:\*(rq or \*(lqFrom:\*(rq field
  4280. ! of the message
  4281. ! .br
  4282. ! $(info): miscellaneous out\-of\-band information
  4283. ! .in -.25i
  4284. ! When a process is invoked, its environment is:
  4285. ! the user/group id:s are set to recipient's id:s;
  4286. ! the working directory is the recipient's directory;
  4287. ! the umask is 0077;
  4288. ! the process has no /dev/tty;
  4289. ! the standard input is set to the message;
  4290. ! the standard output and diagnostic output are set to /dev/null;
  4291. ! all other file\-descriptors are closed;
  4292. ! the envariables \fB$USER\fR, \fB$HOME\fR, \fB$SHELL\fR are set
  4293. ! appropriately,
  4294. ! and no other envariables exist.
  4295. ! The process is given a certain amount of time to execute.
  4296. ! If the process does not exit within this limit,
  4297. ! the process will be terminated with extreme prejudice.
  4298. ! The amount of time is calculated as ((size x 60) + 300) seconds,
  4299. ! where size is the number of bytes in the message.
  4300. ! The exit status of the process is consulted in determining the success of the
  4301. ! action.
  4302. ! An exit status of zero means that the action succeeded.
  4303. ! Any other exit status (or abnormal termination) means that the action failed.
  4304. ! In order to avoid any time limitations,
  4305. ! you might implement a process that began by \fIforking\fR.
  4306. ! The parent would return the appropriate value immediately,
  4307. ! and the child could continue on,
  4308. ! doing whatever it wanted for as long as it wanted.
  4309. ! This approach is somewhat risky if the parent is going to return an
  4310. ! exit status of zero.
  4311. ! If the parent is going to return a non\-zero exit status,
  4312. ! then this approach can lead to quicker delivery into your maildrop.
  4313. ! .ti -.5i
  4314. ! \fIqpipe\fR or \fI<caret>\fR:
  4315. ! .br
  4316. ! Similar to \fIpipe\fR,
  4317. ! but executes the command directly,
  4318. ! after built\-in variable expansion,
  4319. ! without assistance from the shell.
  4320. ! .ti -.5i
  4321. ! \fIdestroy\fR:
  4322. ! .br
  4323. ! This action always succeeds.
  4324. ! .in -.5i
  4325. ! .ti -.25i
  4326. ! \fBresult\fR:
  4327. ! .br
  4328. ! Indicates how the action should be performed:
  4329. ! .in +.5i
  4330. ! .ti -.5i
  4331. ! \fIA\fR:
  4332. ! .br
  4333. ! Perform the action.
  4334. ! If the action succeeds, then the message is considered delivered.
  4335. ! .ti -.5i
  4336. ! \fIR\fR:
  4337. ! .br
  4338. ! Perform the action.
  4339. ! Regardless of the outcome of the action,
  4340. ! the message is not considered delivered.
  4341. ! .ti -.5i
  4342. ! \fI?\fR:
  4343. ! .br
  4344. ! Perform the action only if the message has not been delivered.
  4345. ! If the action succeeds, then the message is considered delivered.
  4346. ! .ti -.5i
  4347. ! \fIN\fR:
  4348. ! .br
  4349. ! Perform the action only if the message has not been delivered
  4350. ! and the previous action succeeded.
  4351. ! If this action succeeds, then the message is considered delivered.
  4352. ! .in -.5i
  4353. ! .in -.5i
  4354. ! The file is always read completely,
  4355. ! so that several matches can be made and several actions can be taken.
  4356. ! The \fI\&.maildelivery\fR file must be owned either by the user or by root,
  4357. ! and must be writable only by the owner.
  4358. ! If the \fI\&.maildelivery\fR file can not be found,
  4359. ! or does not perform an action which delivers the message,
  4360. ! then the file @(MHETCPATH)/maildelivery is read according to the same rules.
  4361. ! This file must be owned by the root and must be writable only by the root.
  4362. ! If this file can not be found
  4363. ! or does not perform an action which delivers the message,
  4364. ! then standard delivery to the user's maildrop, @(MHDROPLOC), is performed.
  4365. ! Arguments in the \fI\&.maildelivery\fR file are separated by white\-space or
  4366. ! comma.
  4367. ! Since double\-quotes are honored,
  4368. ! these characters may be included in a single argument by enclosing the
  4369. ! entire argument in double\-quotes.
  4370. ! A double\-quote can be included by preceeding it with a backslash.
  4371. ! To summarize, here's an example:
  4372. ! .nf
  4373. ! .in +.5i
  4374. ! .ta \w'default  'u +\w'uk-mmdf-workers  'u +\w'action  'u +\w'result  'u
  4375. ! #\fIfield\fR    \fIpattern\fR    \fIaction\fR    \fIresult\fR    \fIstring\fR
  4376. ! # lines starting with a '#' are ignored, as are blank lines
  4377. ! #
  4378. ! # file mail with mmdf2 in the \*(lqTo:\*(rq line into file mmdf2.log
  4379. ! To    mmdf2    file    A    mmdf2.log
  4380. ! # Messages from mmdf pipe to the program err-message-archive
  4381. ! From    mmdf    pipe    A    err-message-archive
  4382. ! # Anything with the \*(lqSender:\*(rq address \*(lquk-mmdf-workers\*(rq
  4383. ! # file in mmdf2.log if not filed already
  4384. ! Sender    uk-mmdf-workers    file    ?    mmdf2.log
  4385. ! # \*(lqTo:\*(rq unix \- put in file unix-news
  4386. ! To    Unix    >    A    unix-news
  4387. ! # if the address is jpo=mmdf \- pipe into mmdf-redist
  4388. ! addr    jpo=mmdf    |    A    mmdf-redist
  4389. ! # if the address is jpo=ack \- send an acknowledgement copy back
  4390. ! addr    jpo=ack    |    R    \*(lqresend\0\-r\0$(reply-to)\*(rq
  4391. ! # anything from steve \- destroy!
  4392. ! From    steve    destroy    A    \-
  4393. ! # anything not matched yet \- put into mailbox
  4394. ! default    \-    >    ?    mailbox
  4395. ! # always run rcvalert
  4396. ! *    \-    |    R    rcvalert
  4397. ! .re
  4398. ! .in -.5i
  4399. ! .fi
  4400. ! .\}
  4401. ! .if '\*(ZS'mmdfII' \{\
  4402. ! See \fImaildelivery\fR\0(5) for the details.
  4403. ! .\}
  4404. ! Four programs are currently standardly available,
  4405.   \fIrcvdist\fR (redistribute incoming messages to additional recipients),
  4406. --- 33,39 ----
  4407.   You do \fBNOT\fR invoke the hook yourself,
  4408. ! rather the hook is invoked on your behalf by your
  4409. ! system's Message Transport Agent.  See \fIslocal\fP\0(1)
  4410. ! for details on how to activate receive\-mail hooks on your system.
  4411.   
  4412. ! Four programs are currently available as part of \fIMH\fP,
  4413.   \fIrcvdist\fR (redistribute incoming messages to additional recipients),
  4414. ***************
  4415. *** 299,301 ****
  4416.   on its command line.
  4417. ! Its use is obsoleted by the \fI\&.maildelivery\fR.
  4418.   
  4419. --- 51,53 ----
  4420.   on its command line.
  4421. ! Its use is obsoleted by the \*(lqfile\*(rq action of \fIslocal\fR.
  4422.   
  4423. ***************
  4424. *** 315,316 ****
  4425. --- 67,81 ----
  4426.   
  4427. + In addition to the standard \fImh\-format\fR\0(5) escapes,
  4428. + \fIrcvtty\fR also recognizes the following additional \fIcomponent\fR escapes:
  4429. + .sp 1
  4430. + .ne 5
  4431. + .nf
  4432. + .ta \w'Dtimenow  'u +\w'Returns  'u
  4433. + \fIEscape\fR    \fIReturns\fR    \fIDescription\fR
  4434. + body    string    the (compressed) first part of the body
  4435. + dtimenow    date    the current date
  4436. + folder    string    the name of the current folder
  4437. + .re
  4438. + .fi
  4439.   Normally, \fIrcvtty\fP obeys
  4440. ***************
  4441. *** 318,320 ****
  4442.   With the `\-biff' option, \fIrcvtty\fP will obey the notification
  4443. ! status set by \fIbiff\fP\0(1).
  4444.   If the terminal access daemon (TTYD) is available on your system,
  4445. --- 83,85 ----
  4446.   With the `\-biff' option, \fIrcvtty\fP will obey the notification
  4447. ! status set by \fIbiff\fP\0(1) instead.
  4448.   If the terminal access daemon (TTYD) is available on your system,
  4449. ***************
  4450. *** 327,371 ****
  4451.   .Sa
  4452. ! .if '\*(ZS'slocal' \{\
  4453. ! rcvstore (1), mh\-format(5)
  4454. ! .\}
  4455. ! .if '\*(ZS'mmdfII' \{\
  4456. ! rcvstore (1), maildelivery(5), mh\-format(5)
  4457. ! .\}
  4458. ! .Co
  4459. ! None
  4460. ! .if '\*(ZS'slocal' \{\
  4461. ! .Hi
  4462. ! For compatibility with older versions of \fIMH\fR,
  4463. ! if \fIslocal\fR can't find the user's \fI\&.maildelivery\fR file,
  4464. ! it will attempt to execute an old\-style rcvmail hook in the user's $HOME
  4465. ! directory.
  4466. ! In particular,
  4467. ! it will first attempt to execute
  4468. ! .ti +.5i
  4469. ! \&.mh\(rureceive file maildrop directory user
  4470. ! failing that it will attempt to execute
  4471. ! .ti +.5i
  4472. ! $HOME/bin/rcvmail user file sender
  4473. ! before giving up and writing to the user's maildrop.
  4474. ! In addition,
  4475. ! whenever a hook or process is invoked,
  4476. ! file\-descriptor three (3) is set to the message in addition to the standard
  4477. ! input.
  4478. ! @BEGIN: MMDFIMTS
  4479. ! In addition to an exit status of zero,
  4480. ! the \fIMMDF\fR values \fIRP_MOK\fR (32) and \fIRP_OK\fR (9)
  4481. ! mean that the message has been fully delivered.
  4482. ! All other non\-zero exit status,
  4483. ! including abnormal termination,
  4484. ! is interpreted as the \fIMMDF\fR value \fIRP_MECH\fR (200),
  4485. ! which means \*(lquse an alternate route\*(rq
  4486. ! (deliver the message to the maildrop).
  4487. ! @END: MMDFIMTS
  4488. ! .\}
  4489.   .Bu
  4490. --- 92,94 ----
  4491.   .Sa
  4492. ! rcvstore (1), mh\-format(5), slocal(1)
  4493.   .Bu
  4494. ***************
  4495. *** 372,383 ****
  4496.   Only two return codes are meaningful, others should be.
  4497. - .if '\*(ZS'mmdfII' \{\
  4498. - Versions of \fIMMDF\fR with the \fImaildelivery\fR mechanism aren't
  4499. - entirely backwards\-compatible with earlier versions.
  4500. - If you have an old\-style hook, the best you can do is to have a one\-line
  4501. - \fI\&.maildelivery\fR file:
  4502. - .ti +.15i
  4503. - default \- pipe A \*(lqbin/rcvmail $(address) $(info) $(sender)\*(rq
  4504. - .\}
  4505.   .En
  4506. --- 95,96 ----
  4507. *** /dev/null    Tue Dec 15 08:01:10 1992
  4508. --- conf/doc/mhparam.rf    Mon Nov 16 14:27:31 1992
  4509. ***************
  4510. *** 0 ****
  4511. --- 1,70 ----
  4512. + .\"    @(MHWARNING)
  4513. + .\" @(#)$Id: mhparam.rf,v 1.2 1992/11/16 22:27:09 jromine Exp $
  4514. + .SC MHPARAM 1
  4515. + .NA
  4516. + mhparam \- print MH profile components
  4517. + .SY
  4518. + mhparam
  4519. + \%[components]
  4520. + \%[-all]
  4521. + \%[-component] \%[-nocomponent]
  4522. + \%[\-help]
  4523. + .DE
  4524. + \fIMhparam\fR writes the value of the specified profile component to
  4525. + the standard output separated by newlines.  If the profile component
  4526. + is not present, the default value (or nothing if there is no default)
  4527. + is printed.
  4528. + If more than one component is specified in the `components' list, the component value is
  4529. + preceded by the component name.  If `\-component' is specified, the
  4530. + component name is displayed even when only one component is specified.
  4531. + If `\-nocomponent' is specified, the component name is not displayed
  4532. + even when more than one component is specified.
  4533. + If `\-all' is specified, all components if the MH profile are
  4534. + displayed and other arguments are ignored.
  4535. + Examples:
  4536. + .nf
  4537. + .ta \w'AliasFile:'u+2n
  4538. + .in +.5i
  4539. + % mhparam path
  4540. + Mail
  4541. + % mhparam mhlproc
  4542. + @(MHETCPATH)/mhl
  4543. + % mhparam \-component path
  4544. + Path:    Mail
  4545. + % mhparam AliasFile rmmproc
  4546. + AliasFile:    aliases
  4547. + rmmproc:    rmmproc
  4548. + % mhparam \-nocomponent AliasFile rmmproc
  4549. + aliases
  4550. + rmmproc
  4551. + .in -.5i
  4552. + .fi
  4553. + \fIMhparam\fR is also useful in back\-quoted operations:
  4554. + .nf
  4555. + .in +.5i
  4556. + % fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
  4557. + .in -.5i
  4558. + .fi
  4559. + .Fi
  4560. + ^$HOME/\&.mh\(ruprofile~^The user profile
  4561. + .Sa
  4562. + mh-profile\|(5)
  4563. + .De
  4564. + `\-nocomponent' if only one component is specified
  4565. + `\-component' if more than one component is specified
  4566. + .Ds
  4567. + `components' defaults to none
  4568. + .Co
  4569. + None
  4570. + .En
  4571. *** ../mh-6.7.2/conf/doc/mhpath.rf    Thu Apr  5 16:04:27 1990
  4572. --- conf/doc/mhpath.rf    Tue Feb 11 14:40:28 1992
  4573. ***************
  4574. *** 1,3 ****
  4575.   .\"    @(MHWARNING)
  4576. ! .\" @(#)$Id: mhpath.rf,v 1.6 90/04/05 15:08:26 sources Exp $
  4577.   .SC MHPATH 1
  4578. --- 1,3 ----
  4579.   .\"    @(MHWARNING)
  4580. ! .\" @(#)$Id: mhpath.rf,v 1.7 1992/02/11 22:40:23 jromine Exp $
  4581.   .SC MHPATH 1
  4582. ***************
  4583. *** 21,22 ****
  4584. --- 21,23 ----
  4585.   Because of this:
  4586. + .sp
  4587.   1) the name \*(lqnew\*(rq has been added to \fImhpath\fR's list of
  4588. ***************
  4589. *** 29,30 ****
  4590. --- 30,32 ----
  4591.   The \*(lqnew\*(rq message may not be used as part of a message range.
  4592. + .sp
  4593.   2) Within a message list,
  4594. ***************
  4595. *** 35,36 ****
  4596. --- 37,39 ----
  4597.   All other message designations must refer to at least one existing message.
  4598. + .sp
  4599.   3) An empty folder is not in itself an error.
  4600. *** ../mh-6.7.2/conf/doc/msgchk.rf    Mon Apr  9 20:22:48 1990
  4601. --- conf/doc/msgchk.rf    Tue Feb 11 13:18:54 1992
  4602. ***************
  4603. *** 1,3 ****
  4604.   .\"    @(MHWARNING)
  4605. ! .\" @(#)$Id: msgchk.rf,v 1.6 90/04/09 20:22:46 sources Exp $
  4606.   .SC MSGCHK 1
  4607. --- 1,3 ----
  4608.   .\"    @(MHWARNING)
  4609. ! .\" @(#)$Id: msgchk.rf,v 1.7 1992/02/04 21:41:41 jromine Exp $
  4610.   .SC MSGCHK 1
  4611. ***************
  4612. *** 11,12 ****
  4613. --- 11,13 ----
  4614.   \%[\-host\ host] \%[\-user\ user]
  4615. + \%[\-apop] \%[\-noapop]
  4616.   \%[\-rpop] \%[\-norpop]
  4617. ***************
  4618. *** 46,53 ****
  4619.   \fImsgchk\fR will query the POP service host as to the status of mail waiting.
  4620. ! The `\-user\ user' switch may be given to specify the name of the POP
  4621. ! subscriber you wish to check mail for on the POP service host.
  4622. ! The `\-rpop' switch uses the UNIX \fIrPOP\fR
  4623. ! (authentication done via trusted connections).
  4624. ! In contrast, the `\-norpop' switch uses the ARPA \fIPOP\fR
  4625. ! (in which case \fImsgchk\fR will prompt for a password).
  4626.   @END: POP
  4627. --- 47,61 ----
  4628.   \fImsgchk\fR will query the POP service host as to the status of mail waiting.
  4629. ! If the `\-user\ user' switch is not given,
  4630. ! then the current username is used.
  4631. ! Normally,
  4632. ! \fImsgchk\fR will prompt for a password to use.
  4633. ! However,
  4634. ! if the `\-apop' switch is given,
  4635. ! \fImsgchk\fR will generate authentication credentials to provide
  4636. ! for origin authentication and replay protection,
  4637. ! but which do not involve sending a password in the clear over the network.
  4638. ! Otherwise,
  4639. ! if the `\-rpop' switch is given,
  4640. ! then \fImsgchk\fR will try to use a \*(lqtrusted\*(rq connection
  4641. ! (ala the BSD r-commands).
  4642.   @END: POP
  4643. *** ../mh-6.7.2/conf/doc/msh.rf    Thu Apr  5 16:04:57 1990
  4644. --- conf/doc/msh.rf    Fri Oct 16 14:36:19 1992
  4645. ***************
  4646. *** 1,3 ****
  4647.   .\"    @(MHWARNING)
  4648. ! .\" @(#)$Id: msh.rf,v 1.8 90/04/05 15:13:40 sources Exp $
  4649.   .SC MSH 1
  4650. --- 1,3 ----
  4651.   .\"    @(MHWARNING)
  4652. ! .\" @(#)$Id: msh.rf,v 1.9 1992/10/16 21:36:14 jromine Exp $
  4653.   .SC MSH 1
  4654. ***************
  4655. *** 65,66 ****
  4656. --- 65,70 ----
  4657.   .br
  4658. + @BEGIN: MIME
  4659. + mhn
  4660. + .br
  4661. + @END: MIME
  4662.   msgchk
  4663. *** ../mh-6.7.2/conf/doc/packf.rf    Thu Apr  5 16:04:58 1990
  4664. --- conf/doc/packf.rf    Tue May 12 15:25:08 1992
  4665. ***************
  4666. *** 1,3 ****
  4667.   .\"    @(MHWARNING)
  4668. ! .\" @(#)$Id: packf.rf,v 1.5 90/04/05 15:13:54 sources Exp $
  4669.   .SC PACKF 1
  4670. --- 1,3 ----
  4671.   .\"    @(MHWARNING)
  4672. ! .\" @(#)$Id: packf.rf,v 1.8 1992/05/12 22:24:59 jromine Exp $
  4673.   .SC PACKF 1
  4674. ***************
  4675. *** 4,6 ****
  4676.   .NA
  4677. ! packf \- compress a folder into a single file
  4678.   .SY
  4679. --- 4,6 ----
  4680.   .NA
  4681. ! packf \- compress an MH folder into a single file
  4682.   .SY
  4683. ***************
  4684. *** 31,32 ****
  4685. --- 31,33 ----
  4686.   ^$HOME/\&.mh\(ruprofile~^The user profile
  4687. + ^\&.msgbox\&.map~^A binary index of the file
  4688.   .Pr
  4689. ***************
  4690. *** 48,49 ****
  4691. --- 49,57 ----
  4692.   The first message packed will become the current message.
  4693. + .Bu
  4694. + \fIPackf\fP doesn't handle the old UUCP-style \*(lqmbox\*(rq format
  4695. + (used by \fISendMail\fP).
  4696. + To pack messages into this format,
  4697. + use the script \fI@(MHETCPATH)/packmbox\fP.
  4698. + Note that \fIpackmbox\fP does not take the `\-file' option of \fIpackf\fP,
  4699. + and instead writes its output on \fIstdout\fP.
  4700.   .En
  4701. *** ../mh-6.7.2/conf/doc/pick.rf    Tue Dec 18 14:57:43 1990
  4702. --- conf/doc/pick.rf    Mon Oct 26 16:03:59 1992
  4703. ***************
  4704. *** 1,3 ****
  4705.   .\"    @(MHWARNING)
  4706. ! .\" @(#)$Id: pick.rf,v 1.6 90/12/18 14:57:30 mh Exp $
  4707.   .SC PICK 1
  4708. --- 1,3 ----
  4709.   .\"    @(MHWARNING)
  4710. ! .\" @(#)$Id: pick.rf,v 1.9 1992/10/27 00:03:47 jromine Exp $
  4711.   .SC PICK 1
  4712. ***************
  4713. *** 27,28 ****
  4714. --- 27,34 ----
  4715.   \%[\-\|\-component\ pattern]
  4716. + \%[\-cc\ pattern]
  4717. + \%[\-date\ pattern]
  4718. + \%[\-from\ pattern]
  4719. + \%[\-search\ pattern]
  4720. + \%[\-subject\ pattern]
  4721. + \%[\-to\ pattern]
  4722.   \%[\-after\ date] \%[\-before\ date] \%[\-datefield\ field]
  4723. ***************
  4724. *** 137,139 ****
  4725. --- 143,153 ----
  4726.   .ti +.5i
  4727. + .ie t \{\
  4728.   pick\0\-after\0yesterday\0\-and\0\-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
  4729. + .\}
  4730. + .el \{\
  4731. + pick\0\-after\0yesterday\0\-and
  4732. + .br
  4733. + .ti +1i
  4734. + \-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
  4735. + .\}
  4736.   
  4737. ***************
  4738. *** 148,149 ****
  4739. --- 162,167 ----
  4740.   
  4741. + If no search criteria are given, all the messages
  4742. + specified on the command
  4743. + line are selected (this defaults to \*(lqall\*(rq).
  4744.   Once the search has been performed,
  4745. ***************
  4746. *** 244,245 ****
  4747. --- 262,267 ----
  4748.   they aren't any more.
  4749. + .Hh
  4750. + Use \*(lqpick sequence \-list\*(rq
  4751. + to enumerate the messages in a sequence (such as for use 
  4752. + by a shell script).
  4753.   .Bu
  4754. ***************
  4755. *** 259,261 ****
  4756.   
  4757. ! and \fIpick\fR fails (e.g., no messages are from \*(lqjones\*(rq),
  4758.   then the shell will still run the outer command (e.g., \*(lqscan\*(rq).
  4759. --- 281,284 ----
  4760.   
  4761. ! and \fIpick\fR selects no messages
  4762. ! (e.g., no messages are from \*(lqjones\*(rq),
  4763.   then the shell will still run the outer command (e.g., \*(lqscan\*(rq).
  4764. ***************
  4765. *** 273,274 ****
  4766. --- 296,300 ----
  4767.   This lets the outer command fail gracefully as well.
  4768. + .sp
  4769. + The pattern syntax \*(lq[l-r]\*(rq is not supported; each letter
  4770. + to be matched must be included within the square brackets.
  4771.   .En
  4772. *** /dev/null    Tue Dec 15 08:01:10 1992
  4773. --- conf/doc/popauth.rf    Thu Feb  6 14:46:26 1992
  4774. ***************
  4775. *** 0 ****
  4776. --- 1,41 ----
  4777. + .\"    @(MHWARNING)
  4778. + .\" @(#)$Id: popauth.rf,v 1.1 1992/02/06 22:46:24 jromine Exp $
  4779. + .SC POPAUTH 8
  4780. + .NA
  4781. + popauth - manipulate POP authorization DB
  4782. + .SY
  4783. + popauth
  4784. + \%[\-init] \%[\-list] \%[\-user\ name]
  4785. + \%[\-help]
  4786. + .DE
  4787. + The \fIpopauth\fR program allows a POP-subscriber to change the secret
  4788. + value used to generate their authentication credentials.
  4789. + In addition,
  4790. + the super\-user or master POP user may use this program to either
  4791. + initialize the database or to print public information from it.
  4792. + \fIpopauth\fR is useful only when the APOP configuration option is defined.
  4793. + (This configuration option defines the name of the POP authorization DB.)
  4794. + Under normal usage,
  4795. + \fIpopauth\fR prompts for a new secret,
  4796. + just like the \fIpasswd\fR program.
  4797. + It then updates the POP authorization DB accordingly.
  4798. + With the `\-init' switch,
  4799. + the super-user or master POP user can create a new (or zero the existing)
  4800. + POP authorization DB.
  4801. + With the `\-list' switch,
  4802. + the super-user or master POP user can print out public information
  4803. + about the named subscriber (or all subscribers).
  4804. + .Fi
  4805. + ^/etc/pop.auth.*~^POP authorization DB
  4806. + .Pr
  4807. + None
  4808. + .Sa
  4809. + popd(8)
  4810. + .De
  4811. + None
  4812. + .Co
  4813. + None
  4814. + .En
  4815. *** ../mh-6.7.2/conf/doc/popd.rf    Mon Apr  9 20:22:50 1990
  4816. --- conf/doc/popd.rf    Tue Feb  4 13:13:28 1992
  4817. ***************
  4818. *** 1,3 ****
  4819.   .\"    @(MHWARNING)
  4820. ! .\" @(#)$Id: popd.rf,v 1.8 90/04/09 20:22:49 sources Exp $
  4821.   .SC POPD 8
  4822. --- 1,3 ----
  4823.   .\"    @(MHWARNING)
  4824. ! .\" @(#)$Id: popd.rf,v 1.9 1992/02/04 21:13:28 jromine Exp $
  4825.   .SC POPD 8
  4826. ***************
  4827. *** 10,12 ****
  4828.   .DE
  4829. ! The \fIpopd\fR server implements the Post Office protocol,
  4830.   as described in RFC1081 and RFC1082.
  4831. --- 10,12 ----
  4832.   .DE
  4833. ! The \fIpopd\fR server implements the Post Office Protocol (version 3),
  4834.   as described in RFC1081 and RFC1082.
  4835. ***************
  4836. *** 16,17 ****
  4837. --- 16,27 ----
  4838.   The `\-p' option overrides the default TCP port.
  4839. + .PP
  4840. + If the POP2 configuration option is defined,
  4841. + then the server also implements version 2 of the protocol.
  4842. + .PP
  4843. + If the APOP configuration option is defined,
  4844. + then the server supports a non-standard mechanism for identity-establishment
  4845. + in which authentication credentials are used to provide for origin
  4846. + authentication and reply protection,
  4847. + but which do not involve sending a password in the clear over the network.
  4848. + See \fIpopauth\fR(8) for more details.
  4849.   .Fi
  4850. *** /dev/null    Tue Dec 15 08:01:10 1992
  4851. --- conf/doc/popi.rf    Thu Feb  6 14:46:25 1992
  4852. ***************
  4853. *** 0 ****
  4854. --- 1,124 ----
  4855. + .\"    @(MHWARNING)
  4856. + .\" @(#)$Id: popi.rf,v 1.1 1992/02/06 22:46:24 jromine Exp $
  4857. + .SC POPI 1
  4858. + .NA
  4859. + popi \- POP initiator
  4860. + .SY
  4861. + popi
  4862. + \%[+folder]
  4863. + \%[\-host\ host] \%[\-user\ user]
  4864. + \%[\-apop] \%[\-noapop]
  4865. + \%[\-rpop] \%[\-norpop]
  4866. + @BEGIN: BPOP
  4867. + \%[\-auto] \%[\-noauto]
  4868. + \%[\-mshproc\ program]
  4869. + @END: BPOP
  4870. + \%[\-form\ formatfile]
  4871. + \%[\-format\ string]
  4872. + \%[\-width\ columns]
  4873. + \%[\-help]
  4874. + .DE
  4875. + \fIpopi\fR is an interactive program that implements the client side
  4876. + of the Post Office Protocol (version 3).
  4877. + When invoked,
  4878. + \fIpopi\fR establishes a POP connection,
  4879. + and enters a command loop.
  4880. + The user may type most of the normal POP commands,
  4881. + with a couple of additions:
  4882. + The commands that \fIpop\fR currently supports are:
  4883. + .sp 1
  4884. + .in +.5i
  4885. + dele msg 
  4886. + .br
  4887. + last
  4888. + .br
  4889. + list [msg]
  4890. + .br
  4891. + noop
  4892. + .br
  4893. + quit
  4894. + .br
  4895. + retr msg
  4896. + .br
  4897. + rset
  4898. + .br
  4899. + scan
  4900. + .br
  4901. + stat
  4902. + .br
  4903. + top
  4904. + @BEGIN: BPOP
  4905. + .br
  4906. + msh
  4907. + @END: BPOP
  4908. + .in -.5i
  4909. + .sp
  4910. + The \fIretr\fR command retrieves a message into the folder specified
  4911. + on the command line.
  4912. + The \fIscan\fR command downloads an MH format-string to the server
  4913. + (as determined from the `\-form\ formatfile' and `\-format switches),
  4914. + so that future invocations of the \fIlist\fR command will include a
  4915. + scan listing.
  4916. + The \fIquit\fR command terminates \fIpopi\fR,
  4917. + as does typing CTRL\-D.
  4918. + @BEGIN: BPOP
  4919. + The \fImsh\fR command invokes the \fImshproc\fR.
  4920. + To override the default \fImshproc\fR and the profile entry,
  4921. + use the `\-mshproc\ program' switch.
  4922. + The `\-auto' switch causes \fIpopi\fR to invoke the \fImshproc\fR directly,
  4923. + and thence terminate when the \fImshproc\fR terminates.
  4924. + @END: BPOP
  4925. + The `\-host\ host' switch specifies the POP server to use.
  4926. + If the `\-user\ user' switch is not given,
  4927. + then the current username is used.
  4928. + Normally,
  4929. + \fIpopi\fR will prompt for a password to use.
  4930. + However,
  4931. + if the `\-apop' switch is given,
  4932. + \fIpopi\fR will generate authentication credentials to provide
  4933. + for origin authentication and replay protection,
  4934. + but which do not involve sending a password in the clear over the network.
  4935. + Otherwise,
  4936. + if the `\-rpop' switch is given,
  4937. + then \fIpopi\fR will try to use a \*(lqtrusted\*(rq connection
  4938. + (ala the BSD r-commands).
  4939. + .Fi
  4940. + ^$HOME/\&.mh\(ruprofile~^The user profile
  4941. + ^@(MHETCPATH)/mtstailor~^tailor file
  4942. + .Pr
  4943. + ^Path:~^To determine the user's MH directory
  4944. + .Ps
  4945. + ^Msg\-Protect:~^To set mode when creating a new `file'
  4946. + @BEGIN: BPOP
  4947. + .Ps
  4948. + ^mshproc:~^Program to read a given BBoard
  4949. + @END: BPOP
  4950. + .Sa
  4951. + msh(1)
  4952. + .De
  4953. + `+folder' defaults to \*(lqinbox\*(rq
  4954. + .Ds
  4955. + `\-noapop'
  4956. + .Ds
  4957. + `\-norpop'
  4958. + @BEGIN: BPOP
  4959. + .Ds
  4960. + `\-auto'
  4961. + @END: BPOP
  4962. + .Ds
  4963. + `\-format' defaulted as described above
  4964. + .Ds
  4965. + `\-width' defaulted to the width of the terminal
  4966. + .Co
  4967. + The folder into which messages are being incorporated will become the
  4968. + current folder.
  4969. + The current message is unchanged.
  4970. + .Bu
  4971. + The argument to the `\-format' switch must be interpreted as a single token
  4972. + by the shell that invokes \fIinc\fR.
  4973. + Therefore,
  4974. + one must usually place the argument to this switch inside double\-quotes.
  4975. + .En
  4976. *** ../mh-6.7.2/conf/doc/post.rf    Thu Apr  5 16:05:02 1990
  4977. --- conf/doc/post.rf    Thu Oct 29 14:24:52 1992
  4978. ***************
  4979. *** 1,3 ****
  4980.   .\"    @(MHWARNING)
  4981. ! .\" @(#)$Id: post.rf,v 1.5 90/04/05 15:14:35 sources Exp $
  4982.   .SC POST 8
  4983. --- 1,3 ----
  4984.   .\"    @(MHWARNING)
  4985. ! .\" @(#)$Id: post.rf,v 1.7 1992/10/29 22:24:50 jromine Exp $
  4986.   .SC POST 8
  4987. ***************
  4988. *** 13,14 ****
  4989. --- 13,17 ----
  4990.   \%[\-format] \%[\-noformat]
  4991. + @BEGIN: MIME
  4992. + \%[\-mime] \%[\-nomime]
  4993. + @END: MIME
  4994.   \%[\-msgid] \%[\-nomsgid]
  4995. ***************
  4996. *** 62,63 ****
  4997. --- 65,71 ----
  4998.   prior to being sent to the blind recipients.
  4999. + @BEGIN: MIME
  5000. + Otherwise,
  5001. + to use the MIME rules for encapsulation,
  5002. + specify the `\-mime' switch.
  5003. + @END: MIME
  5004.   
  5005. ***************
  5006. *** 100,102 ****
  5007. --- 108,114 ----
  5008.   `\-format'
  5009. + @BEGIN: MIME
  5010.   .Ds
  5011. + `\-nomime'
  5012. + @END: MIME
  5013. + .Ds
  5014.   `\-nomsgid'
  5015. ***************
  5016. *** 105,107 ****
  5017.   .Ds
  5018. ! '\-nowatch'
  5019.   .Ds
  5020. --- 117,119 ----
  5021.   .Ds
  5022. ! `\-nowatch'
  5023.   .Ds
  5024. *** ../mh-6.7.2/conf/doc/prompter.rf    Tue Dec 18 15:12:08 1990
  5025. --- conf/doc/prompter.rf    Tue May 12 15:23:56 1992
  5026. ***************
  5027. *** 1,3 ****
  5028.   .\"    @(MHWARNING)
  5029. ! .\" @(#)$Id: prompter.rf,v 1.7 90/12/18 15:12:01 mh Exp $
  5030.   .SC PROMPTER 1
  5031. --- 1,3 ----
  5032.   .\"    @(MHWARNING)
  5033. ! .\" @(#)$Id: prompter.rf,v 1.8 1992/05/12 22:23:34 jromine Exp $
  5034.   .SC PROMPTER 1
  5035. ***************
  5036. *** 4,6 ****
  5037.   .NA
  5038. ! prompter \- prompting editor front\-end
  5039.   .SY
  5040. --- 4,6 ----
  5041.   .NA
  5042. ! prompter \- prompting editor front-end for MH
  5043.   .SY
  5044. *** ../mh-6.7.2/conf/doc/rcvstore.rf    Thu Apr  5 16:05:04 1990
  5045. --- conf/doc/rcvstore.rf    Thu Nov 19 16:40:45 1992
  5046. ***************
  5047. *** 1,3 ****
  5048.   .\"    @(MHWARNING)
  5049. ! .\" @(#)$Id: rcvstore.rf,v 1.5 90/04/05 15:14:48 sources Exp $
  5050.   .SC RCVSTORE 1
  5051. --- 1,3 ----
  5052.   .\"    @(MHWARNING)
  5053. ! .\" @(#)$Id: rcvstore.rf,v 1.7 1992/11/20 00:40:37 jromine Exp $
  5054.   .SC RCVSTORE 1
  5055. ***************
  5056. *** 17,20 ****
  5057.   If `+folder' isn't specified,
  5058. ! the folder named \*(lqinbox\*(rq in the user's \fIMH\fR directory will be used
  5059. ! instead.
  5060.   The new message being incorporated is assigned the next highest
  5061. --- 17,21 ----
  5062.   If `+folder' isn't specified,
  5063. ! a folder in the user's \fIMH\fR directory will be used, either that
  5064. ! specified by the \*(lqInbox:\*(rq entry in the user's profile, or
  5065. ! the folder named \*(lqinbox\*(rq.
  5066.   The new message being incorporated is assigned the next highest
  5067. ***************
  5068. *** 60,61 ****
  5069. --- 61,64 ----
  5070.   .Ps
  5071. + ^Inbox:~^To find the default inbox
  5072. + .Ps
  5073.   ^Msg\-Protect:~^To set mode when creating a new message
  5074. ***************
  5075. *** 76,77 ****
  5076. --- 79,87 ----
  5077.   with the exception of sequence manipulation.
  5078. + .Bu
  5079. + If you use the \*(lqUnseen\-Sequence\*(rq profile entry,
  5080. + \fIrcvstore\fP could try to update the context while another
  5081. + \fIMH\fP process is also trying to do so.
  5082. + This can cause the context to become corrupted.
  5083. + To avoid this, do not use \fIrcvstore\fP
  5084. + if you use the \*(lqUnseen\-Sequence\*(rq profile entry.
  5085.   .En
  5086. *** ../mh-6.7.2/conf/doc/refile.rf    Wed Jan 29 15:51:18 1992
  5087. --- conf/doc/refile.rf    Mon Feb 10 12:27:40 1992
  5088. ***************
  5089. *** 1,3 ****
  5090.   .\"    @(MHWARNING)
  5091. ! .\" @(#)$Id: refile.rf,v 1.8 1991/01/14 16:43:06 mh Exp $
  5092.   .SC REFILE 1
  5093. --- 1,3 ----
  5094.   .\"    @(MHWARNING)
  5095. ! .\" @(#)$Id: refile.rf,v 1.11 1992/02/10 20:27:30 jromine Exp $
  5096.   .SC REFILE 1
  5097. ***************
  5098. *** 50,51 ****
  5099. --- 50,54 ----
  5100.   A negative response will abort the file operation.
  5101. + If the standard input for \fIrefile\fR is \fInot\fR a tty,
  5102. + then \fIrefile\fR will not ask any questions and will proceed as if
  5103. + the user's answer was \*(lqyes\*(rq for all questions.
  5104.   
  5105. ***************
  5106. *** 111,113 ****
  5107.   \fIrefile\fR will also define those sequences for the destination folders.
  5108. ! See \fImh\-profile\fR\0(1) for information concerning the previous sequence.
  5109.   .Bu
  5110. --- 114,116 ----
  5111.   \fIrefile\fR will also define those sequences for the destination folders.
  5112. ! See \fImh\-sequence\fR\0(5) for information concerning the previous sequence.
  5113.   .Bu
  5114. *** ../mh-6.7.2/conf/doc/repl.rf    Mon Dec 17 16:00:43 1990
  5115. --- conf/doc/repl.rf    Tue Nov 17 17:19:08 1992
  5116. ***************
  5117. *** 1,3 ****
  5118.   .\"    @(MHWARNING)
  5119. ! .\" @(#)$Id: repl.rf,v 1.10 90/12/17 16:00:35 mh Exp $
  5120.   .SC REPL 1
  5121. --- 1,3 ----
  5122.   .\"    @(MHWARNING)
  5123. ! .\" @(#)$Id: repl.rf,v 1.11 1992/11/18 01:18:54 jromine Exp $
  5124.   .SC REPL 1
  5125. ***************
  5126. *** 120,124 ****
  5127.   .in +.5i
  5128. ! message-id:nocomponent,formatfield=\\
  5129. ! "In message %{text}you write:"
  5130. ! body:component=">",overflowtext=">",overflowoffset=0
  5131.   .in -.5i
  5132. --- 120,127 ----
  5133.   .in +.5i
  5134. ! .ie n \{
  5135. ! message-id:nocomponent,\|nonewline,\\
  5136. ! formatfield=\*(lqIn message %{text},\ \*(rq \}
  5137. ! .el message-id:nocomponent,\|nonewline,\|formatfield=\*(lqIn message %{text},\ \*(rq
  5138. ! from:nocomponent,\|formatfield=\*(lq%(friendly{text}) writes:\*(rq
  5139. ! body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
  5140.   .in -.5i
  5141. ***************
  5142. *** 126,128 ****
  5143.   
  5144. ! Which cites the Message-ID of the message being replied\-to,
  5145.   and then outputs each line of the body prefaced
  5146. --- 129,132 ----
  5147.   
  5148. ! Which cites the Message-ID and author
  5149. ! of the message being replied\-to,
  5150.   and then outputs each line of the body prefaced
  5151. *** ../mh-6.7.2/conf/doc/rmf.rf    Thu Apr  5 16:05:06 1990
  5152. --- conf/doc/rmf.rf    Tue May 12 15:25:07 1992
  5153. ***************
  5154. *** 1,3 ****
  5155.   .\"    @(MHWARNING)
  5156. ! .\" @(#)$Id: rmf.rf,v 1.5 90/04/05 15:15:06 sources Exp $
  5157.   .SC RMF 1
  5158. --- 1,3 ----
  5159.   .\"    @(MHWARNING)
  5160. ! .\" @(#)$Id: rmf.rf,v 1.7 1992/05/12 22:24:59 jromine Exp $
  5161.   .SC RMF 1
  5162. ***************
  5163. *** 4,6 ****
  5164.   .NA
  5165. ! rmf \- remove folder
  5166.   .SY
  5167. --- 4,6 ----
  5168.   .NA
  5169. ! rmf \- remove an MH folder
  5170.   .SY
  5171. ***************
  5172. *** 20,22 ****
  5173.   If \fIrmf\fR can't find the current folder, for some reason,
  5174. ! the folder to be removed defaults to `+inbox' with confirmation.
  5175.   
  5176. --- 20,23 ----
  5177.   If \fIrmf\fR can't find the current folder, for some reason,
  5178. ! the folder to be removed defaults to `+inbox' (unless overridden by
  5179. ! user's profile entry \*(lqInbox\*(rq) with confirmation.
  5180.   
  5181. ***************
  5182. *** 42,43 ****
  5183. --- 43,46 ----
  5184.   ^Current\-Folder:~^To find the default current folder
  5185. + .Ps
  5186. + ^Inbox:~^To find the default inbox
  5187.   .Sa
  5188. *** ../mh-6.7.2/conf/doc/scan.rf    Wed Jan 29 14:56:25 1992
  5189. --- conf/doc/scan.rf    Thu Oct 29 14:02:01 1992
  5190. ***************
  5191. *** 1,3 ****
  5192.   .\"    @(MHWARNING)
  5193. ! .\" @(#)$Id: scan.rf,v 1.10 1992/01/29 22:56:18 jromine Exp $
  5194.   .SC SCAN 1
  5195. --- 1,3 ----
  5196.   .\"    @(MHWARNING)
  5197. ! .\" @(#)$Id: scan.rf,v 1.11 1992/10/29 22:01:56 jromine Exp $
  5198.   .SC SCAN 1
  5199. ***************
  5200. *** 90,92 ****
  5201.   .nf
  5202. ! .ta \w'Escape  'u +\w'Returns  'u
  5203.   \fIEscape\fR    \fIReturns\fR    \fIDescription\fR
  5204. --- 90,92 ----
  5205.   .nf
  5206. ! .ta \w'Dtimenow  'u +\w'Returns  'u
  5207.   \fIEscape\fR    \fIReturns\fR    \fIDescription\fR
  5208. ***************
  5209. *** 93,94 ****
  5210. --- 93,95 ----
  5211.   body    string    the (compressed) first part of the body
  5212. + dtimenow    date    the current date
  5213.   folder    string    the name of the current folder
  5214. ***************
  5215. *** 100,102 ****
  5216.   date of last modification of the message file itself.
  5217.   
  5218. --- 101,102 ----
  5219. *** ../mh-6.7.2/conf/doc/send.rf    Thu Apr  5 16:04:35 1990
  5220. --- conf/doc/send.rf    Fri Dec  4 09:30:28 1992
  5221. ***************
  5222. *** 1,3 ****
  5223.   .\"    @(MHWARNING)
  5224. ! .\" @(#)$Id: send.rf,v 1.6 90/04/05 15:09:54 sources Exp $
  5225.   .SC SEND 1
  5226. --- 1,3 ----
  5227.   .\"    @(MHWARNING)
  5228. ! .\" @(#)$Id: send.rf,v 1.12 1992/12/04 17:30:23 jromine Exp $
  5229.   .SC SEND 1
  5230. ***************
  5231. *** 16,17 ****
  5232. --- 16,20 ----
  5233.   \%[\-forward] \%[\-noforward]
  5234. + @BEGIN: MIME
  5235. + \%[\-mime] \%[\-nomime]
  5236. + @END: MIME
  5237.   \%[\-msgid] \%[\-nomsgid]
  5238. ***************
  5239. *** 18,19 ****
  5240. --- 21,25 ----
  5241.   \%[\-push] \%[\-nopush]
  5242. + @BEGIN: MIME
  5243. + \%[\-split\ seconds]
  5244. + @END: MIME
  5245.   \%[\-verbose] \%[\-noverbose]
  5246. ***************
  5247. *** 53,55 ****
  5248. --- 59,75 ----
  5249.   information.
  5250. + @BEGIN: MIME
  5251.   
  5252. + If `\-split' is specified,
  5253. + \fIsend\fR will split the draft into one or more partial messages
  5254. + prior to sending.
  5255. + This makes use of the multi-media content feature in MH.
  5256. + Note however that if \fIsend\fR is invoked under \fIdist\fR\0(1),
  5257. + then this switch is ignored\0--\0it makes no sense to redistribute a
  5258. + message in this fashion.
  5259. + Sometimes you want \fIsend\fR to pause after posting a partial message.
  5260. + This is usually the case when you are running \fIsendmail\fR and
  5261. + expect to generate a lot of partial messages.
  5262. + The argument to `\-split' tells it how long to pause between postings.
  5263. + @END: MIME
  5264.   \fISend\fR with no \fIfile\fR
  5265. ***************
  5266. *** 76,77 ****
  5267. --- 96,102 ----
  5268.   prior to being sent to the blind recipients.
  5269. + @BEGIN: MIME
  5270. + Otherwise,
  5271. + to use the MIME rules for encapsulation,
  5272. + specify the `-mime' switch.
  5273. + @END: MIME
  5274.   
  5275. ***************
  5276. *** 123,125 ****
  5277.   
  5278. ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
  5279.   additional alias files given by the `\-alias aliasfile' switch will be read
  5280. --- 148,150 ----
  5281.   
  5282. ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
  5283.   additional alias files given by the `\-alias aliasfile' switch will be read
  5284. ***************
  5285. *** 158,160 ****
  5286. --- 183,189 ----
  5287.   `\-forward'
  5288. + @BEGIN: MIME
  5289.   .Ds
  5290. + `\-nomime'
  5291. + @END: MIME
  5292. + .Ds
  5293.   `\-nomsgid'
  5294. ***************
  5295. *** 170,171 ****
  5296. --- 199,207 ----
  5297.   None
  5298. + .Bu
  5299. + Under some configurations, it is not possible to mointor the
  5300. + mail delivery transaction; `\-watch' is a no-op on those systems.
  5301. + .sp
  5302. + @BEGIN: MIME
  5303. + Using `\-split\00' doesn't work correctly.
  5304. + @END: MIME
  5305.   .En
  5306. *** ../mh-6.7.2/conf/doc/show.rf    Mon Dec 17 16:03:28 1990
  5307. --- conf/doc/show.rf    Tue May 19 14:57:41 1992
  5308. ***************
  5309. *** 1,3 ****
  5310.   .\"    @(MHWARNING)
  5311. ! .\" @(#)$Id: show.rf,v 1.5 90/04/05 15:15:20 sources Exp $
  5312.   .SC SHOW 1
  5313. --- 1,3 ----
  5314.   .\"    @(MHWARNING)
  5315. ! .\" @(#)$Id: show.rf,v 1.7 1992/05/19 21:57:39 jromine Exp $
  5316.   .SC SHOW 1
  5317. ***************
  5318. *** 33,35 ****
  5319. --- 33,49 ----
  5320.   `/bin/cat' is used instead of \fIshowproc\fR.
  5321. + @BEGIN: MIME
  5322.   
  5323. + If you have messages with multi-media content,
  5324. + you should define the profile entry \fImhnproc\fR,
  5325. + which is the name of a program to manipulate multi-media messages.
  5326. + The \fImhn\fR\0(1) program is suitable for this purpose.
  5327. + Note that if the \fImhnproc\fR profile entry is defined,
  5328. + the `\-noshowproc' option is NOT specified,
  5329. + and if one or more named messages has a multi-media content,
  5330. + then the program indicated by \fImhnproc\fR will be run instead of
  5331. + \fIshowproc\fR.
  5332. + The use of the \fImhnproc\fR can also be disabled if the
  5333. + environment variable \fB$NOMHNPROC\fR is set.
  5334. + @END: MIME
  5335.   The `\-header' switch tells \fIshow\fR to display a one\-line
  5336. ***************
  5337. *** 71,72 ****
  5338. --- 85,90 ----
  5339.   ^showproc:~^Program to show messages
  5340. + @BEGIN: MIME
  5341. + .Ps
  5342. + ^mhnproc:~^Program to show messages with multi-media content
  5343. + @END: MIME
  5344.   .Sa
  5345. *** /dev/null    Tue Dec 15 08:01:10 1992
  5346. --- conf/doc/slocal.rf    Wed Oct 28 08:53:07 1992
  5347. ***************
  5348. *** 0 ****
  5349. --- 1,377 ----
  5350. + .\"    @(MHWARNING)
  5351. + .\" @(#)$Id: slocal.rf,v 1.15 1992/10/28 16:53:03 jromine Exp $
  5352. + .SC SLOCAL 1
  5353. + .NA
  5354. + slocal \- special local mail delivery
  5355. + .SY
  5356. + @(MHETCPATH)/slocal \%[address\ info\ sender]
  5357. + .na
  5358. + .br
  5359. + \%[\-addr\ address]
  5360. + \%[\-info\ data]
  5361. + \%[\-sender\ sender]
  5362. + .br
  5363. + \%[\-user\ username]
  5364. + \%[\-mailbox\ mbox]
  5365. + \%[\-file\ file]
  5366. + .\" \%[\-home\ homedir]
  5367. + .br
  5368. + \%[\-maildelivery\ deliveryfile]
  5369. + \%[\-verbose] \%[\-noverbose]
  5370. + \%[\-debug]
  5371. + \%[\-help]
  5372. + .ad
  5373. + .DE
  5374. + \fISlocal\fP is a program designed to allow you to have
  5375. + your inbound mail processed according to a complex
  5376. + set of selection criteria.
  5377. + You do not normally invoke \fIslocal\fP yourself,
  5378. + rather \fIslocal\fP is invoked on your behalf by your system's 
  5379. + Message Transfer Agent.
  5380. + The message selection
  5381. + criteria used by \fIslocal\fP
  5382. + is specified in the file \fI\&.maildelivery\fP
  5383. + in the user's home directory.  The format of this file
  5384. + is given below.
  5385. + The message delivery address and message sender are
  5386. + determined from the Message Transfer Agent
  5387. + envelope information, if possible.  Under \fISendMail\fP,
  5388. + the sender will obtained from the UUCP \*(lqFrom\ \*(rq
  5389. + line, if present.  The user may override these values
  5390. + with command line arguments, or arguments to 
  5391. + the `\-addr' and `\-sender' switches.
  5392. + The message is normally read from the standard input.
  5393. + The `\-file' switch sets the name of the file from which
  5394. + the message should be read, instead of reading stdin.
  5395. + The `\-user' switch tells \fIslocal\fP
  5396. + the name of the user for whom it is delivering mail.
  5397. + The `\-mailbox' switch tells \fIslocal\fP the name
  5398. + of the user's maildrop file.
  5399. + The `\-info' switch may be used to pass an arbitrary
  5400. + argument to sub-processes which \fIslocal\fP may
  5401. + invoke on your behalf.
  5402. + The `\-verbose' switch causes \fIslocal\fP
  5403. + to give information on stdout about its progress.
  5404. + The `\-debug' switch produces more verbose debugging output on stderr.
  5405. + .Uh "Message Transfer Agents"
  5406. + If your MTA is \fISendMail\fP,
  5407. + you should include the line
  5408. + .sp
  5409. + .nf
  5410. + .in +.5i
  5411. +     \*(lq|\ @(MHETCPATH)/slocal\ \-user\ username\*(rq
  5412. + .in -.5i
  5413. + .fi
  5414. + .sp
  5415. + in your \&.forward file in your home directory.
  5416. + This will cause \fISendMail\fP to invoke \fIslocal\fP on your behalf.
  5417. + If your MTA is \fIMMDF-I\fP,
  5418. + you should (symbolically) link @(MHETCPATH)/slocal to the file
  5419. + bin/rcvmail in your home directory.
  5420. + This will cause \fIMMDF-I\fP to invoke \fIslocal\fP on your behalf
  5421. + with the correct \*(lq\fIaddress\ info\ sender\fP\*(rq arguments.
  5422. + If your MTA is \fIMMDF-II\fP,
  5423. + then you should not use \fIslocal\fP.
  5424. + An equivalent functionality is already provided by \fIMMDF-II\fP;
  5425. + see maildelivery(5) for details.
  5426. + .Uh "The Maildelivery File"
  5427. + The \fI\&.maildelivery\fR file
  5428. + controls how local delivery is performed.
  5429. + Each line of this file
  5430. + consists of five fields, separated by white-space or comma.
  5431. + Since double-quotes are honored,
  5432. + these characters may be included in a single argument by enclosing the
  5433. + entire argument in double-quotes.
  5434. + A double-quote can be included by preceding it with a backslash.
  5435. + Lines beginning with `#' are ignored.
  5436. + The format of each line in the \fI\&.maildelivery\fR file is:
  5437. +     \fBheader    pattern    action    result    string\fR
  5438. + .sp
  5439. + .in +.5i
  5440. + .ti -.5i
  5441. + \fBheader\fP:
  5442. + .br
  5443. + The name of a header field that is to be searched for a pattern.
  5444. + This is any field in the headers of the message that might be present.
  5445. + The following special fields are also defined:
  5446. + .sp
  5447. + .in +1i
  5448. + .ta +1i
  5449. + .ti -1i
  5450. + \fIsource\fR    the out-of-band sender information
  5451. + .ti -1i
  5452. + \fIaddr\fR    the address that was used to cause delivery to the recipient
  5453. + .ti -1i
  5454. + \fIdefault\fR    this matches \fIonly\fR if the message hasn't been delivered yet
  5455. + .ti -1i
  5456. + \fI*\fR    this always matches
  5457. + .in -1i
  5458. + .ti -.5i
  5459. + \fBpattern\fR:
  5460. + .br
  5461. + The sequence
  5462. + of characters to match in the specified header field.
  5463. + Matching is case-insensitive, but does not use regular expressions.
  5464. + .ti -.5i
  5465. + \fBaction\fR:
  5466. + .br
  5467. + The action to take to deliver the message:
  5468. + .sp
  5469. + .in +1i
  5470. + .ta +1i
  5471. + .ti -1i
  5472. + \fIdestroy\fR    This action always succeeds.
  5473. + .ti -1i
  5474. + \fIfile\fR or >    Append
  5475. + the message to the file named by \fBstring\fR.
  5476. + The message is appended to the file in the maildrop 
  5477. + format which is used by your message transport system.
  5478. + If the message can be appended to the file,
  5479. + then this action succeeds.
  5480. + When writing to the file,
  5481. + a \*(lqDelivery\-Date:\ date\*(rq header is added
  5482. + which indicates the date and time that message was appended to the file.
  5483. + .ti -1i
  5484. + \fImbox\fR    Identical
  5485. + to \fIfile\fR,
  5486. + but always appends the message using the format used by \fIpackf\fR
  5487. + (the MMDF mailbox format).
  5488. + .ti -1i
  5489. + \fIpipe\fR or |    Pipe
  5490. + the message as the standard input to the command named by \fBstring\fR,
  5491. + using the Bourne shell \fIsh\fR(1) to interpret the string.
  5492. + Prior to giving the string to the shell,
  5493. + it is expanded with the following built-in variables:
  5494. + .sp
  5495. + .in +1i
  5496. + .ta +1i
  5497. + .ti -1i
  5498. + $(sender)     the out-of-band sender information
  5499. + .ti -1i
  5500. + $(address)     the address that was used to cause delivery to the recipient
  5501. + .ti -1i
  5502. + $(size)    the size of the message in bytes
  5503. + .ti -1i
  5504. + $(reply\-to)     either the \*(lqReply\-To:\*(rq or \*(lqFrom:\*(rq field
  5505. + of the message
  5506. + .ti -1i
  5507. + $(info)    the out-of-band information specified
  5508. + .in -1i
  5509. + .ti -1i
  5510. + \fIqpipe\fR or
  5511. + .ti -1i
  5512. + \fI<caret>\fR    Similar to \fIpipe\fR,
  5513. + but executes the command directly,
  5514. + after built-in variable expansion,
  5515. + without assistance from the shell.
  5516. + This action can be used to avoid quoting special characters
  5517. + which your shell might interpret.
  5518. + .in -1i
  5519. + .ti -.5i
  5520. + \fBresult\fR:
  5521. + .br
  5522. + Indicates how the action should be performed:
  5523. + .in +1i
  5524. + .ta +1i
  5525. + .ti -1i
  5526. + \fIA\fR    Perform the action.
  5527. + If the action succeeds, then the message is considered delivered.
  5528. + .ti -1i
  5529. + \fIR\fR    Perform the action.
  5530. + Regardless of the outcome of the action,
  5531. + the message is not considered delivered.
  5532. + .ti -1i
  5533. + \fI?\fR    Perform
  5534. + the action only if the message has not been delivered.
  5535. + If the action succeeds, then the message is considered delivered.
  5536. + .ti -1i
  5537. + \fIN\fR    Perform
  5538. + the action only if the message has not been delivered
  5539. + and the previous action succeeded.
  5540. + If this action succeeds, then the message is considered delivered.
  5541. + .sp
  5542. + .in -1i
  5543. + .in -.5i
  5544. + To summarize, here's an example:
  5545. + .sp
  5546. + .if t .in +.5i
  5547. + .nf
  5548. + .ta \w'default  'u +\w'mh-workersxx 'uC +\w'destroy 'uC +\w'result 'u
  5549. + #\fIfield\fR    \fIpattern\fR    \fIaction\fR    \fIresult\fR    \fIstring\fR
  5550. + # lines starting with a '#' are ignored, as are blank lines
  5551. + #
  5552. + # file mail with mmdf2 in the \*(lqTo:\*(rq line into file mmdf2.log
  5553. + \fITo    mmdf2    file    A    mmdf2.log\fP
  5554. + # Messages from mmdf pipe to the program err-message-archive
  5555. + \fIFrom    mmdf    pipe    A    /bin/err-message-archive\fP
  5556. + # Anything with the \*(lqSender:\*(rq address \*(lqmh-workers\*(rq
  5557. + # file in mh.log if not filed already
  5558. + \fISender    mh-workers    file    ?    mh.log\fP
  5559. + # \*(lqTo:\*(rq unix \- put in file unix-news
  5560. + \fITo    Unix    >    A    unix-news\fP
  5561. + .\" # if the address is jpo=mmdf \- pipe into mmdf-redist
  5562. + .\" \fIaddr    jpo=mmdf    |    A    mmdf-redist\fP
  5563. + # if the address is jpo=ack \- send an acknowledgement copy back
  5564. + \fIaddr    jpo=ack    \fP|\fI    R    \*(lq/bin/resend\0\-r\0$(reply-to)\*(rq\fP
  5565. + # anything from steve \- destroy!
  5566. + \fIFrom    steve    destroy    A    \-\fP
  5567. + # anything not matched yet \- put into mailbox
  5568. + \fIdefault    \-    >    ?    mailbox\fP
  5569. + # always run rcvtty
  5570. + \fI*    \-    \fP|\fI    R    /mh/lib/rcvtty\fP
  5571. + .re
  5572. + .fi
  5573. + .if t .in -.5i
  5574. + The file is always read completely,
  5575. + so that several matches can be made and several actions can be taken.
  5576. + The \fI\&.maildelivery\fR file must be owned either by the user or by root,
  5577. + and must be writable only by the owner.
  5578. + If the \fI\&.maildelivery\fR file cannot be found,
  5579. + or does not perform an action which delivers the message,
  5580. + then the file @(MHETCPATH)/maildelivery is read according to the same rules.
  5581. + This file must be owned by the root and must be writable only by the root.
  5582. + If this file cannot be found
  5583. + or does not perform an action which delivers the message,
  5584. + then standard delivery to the user's maildrop is performed.
  5585. + .Uh "Sub-process environment"
  5586. + When a process is invoked, its environment is:
  5587. + the user/group-ids are set to recipient's ids;
  5588. + the working directory is the recipient's home directory;
  5589. + the umask is 0077;
  5590. + the process has no /dev/tty;
  5591. + the standard input is set to the message;
  5592. + the standard output and diagnostic output are set to /dev/null;
  5593. + all other file-descriptors are closed;
  5594. + the envariables \fB$USER\fR, \fB$HOME\fR, \fB$SHELL\fR are set
  5595. + appropriately,
  5596. + and no other envariables exist.
  5597. + The process is given a certain amount of time to execute.
  5598. + If the process does not exit within this limit,
  5599. + the process will be terminated with extreme prejudice.
  5600. + The amount of time is calculated as ((size x 60) + 300) seconds,
  5601. + where size is the number of bytes in the message.
  5602. + The exit status of the process is consulted in determining the success of the
  5603. + action.
  5604. + An exit status of zero means that the action succeeded.
  5605. + Any other exit status (or abnormal termination) means that the action failed.
  5606. + In order to avoid any time limitations,
  5607. + you might implement a process that began by \fIforking\fR.
  5608. + The parent would return the appropriate value immediately,
  5609. + and the child could continue on,
  5610. + doing whatever it wanted for as long as it wanted.
  5611. + This approach is somewhat risky if the parent is going to return an
  5612. + exit status of zero.
  5613. + If the parent is going to return a non-zero exit status,
  5614. + then this approach can lead to quicker delivery into your maildrop.
  5615. + @BEGIN: MSGID
  5616. + .Uh "Duplicate Message Suppression"
  5617. + \fIslocal\fR is able to detect and supress duplicate messages.
  5618. + To enable this,
  5619. + create two empty files in your $HOME directory:
  5620. + \&.maildelivery.pag and \&.maildelivery.dir.
  5621. + These are ndbm files which are used to store the Message-IDs of
  5622. + incoming messages.
  5623. + @END: MSGID
  5624. + .Fi
  5625. + ^@(MHETCPATH)/mtstailor~^MH tailor file
  5626. + ^$HOME/\&.maildelivery~^The file controlling local delivery
  5627. + ^@(MHETCPATH)/maildelivery~^Rather than the standard file
  5628. + ^@(MHDROPLOC)~^The default maildrop
  5629. + .Sa
  5630. + rcvstore(1), mhook(1), mh\-format(5)
  5631. + @BEGIN: MMDFIIMTS
  5632. + , maildelivery(5)
  5633. + @END: MMDFIIMTS
  5634. + .De
  5635. + `\-noverbose'
  5636. + .Ds
  5637. + `\-maildelivery \&.maildelivery'
  5638. + .Ds
  5639. + `\-mailbox @(MHDROPLOC)'
  5640. + .Ds
  5641. + `\-file' defaults to stdin
  5642. + .Ds
  5643. + `\-user' defaults to the current user
  5644. + .Co
  5645. + None
  5646. + .Hi
  5647. + @BEGIN: MHMTS
  5648. + For compatibility with older versions of \fIMH\fR,
  5649. + if \fIslocal\fR can't find the user's \fI\&.maildelivery\fR file,
  5650. + it will attempt to execute an old-style rcvmail hook in the user's $HOME
  5651. + directory.
  5652. + In particular,
  5653. + it will first attempt to execute
  5654. + .ti +.5i
  5655. + \&.mh\(rureceive file maildrop directory user
  5656. + failing that it will attempt to execute
  5657. + .ti +.5i
  5658. + $HOME/bin/rcvmail user file sender
  5659. + before giving up and writing to the user's maildrop.
  5660. + In addition,
  5661. + whenever a hook or process is invoked,
  5662. + file-descriptor three (3) is set to the message in addition to the standard
  5663. + input.
  5664. + @END: MHMTS
  5665. + \fISlocal\fP is designed to be backward-compatible with the
  5666. + \fImaildelivery\fP facility provided by \fIMMDF-II\fP.
  5667. + Thus, the \fI\&.maildelivery\fP file syntax is limited,
  5668. + as is the functionality of \fIslocal\fP.
  5669. + In addition to an exit status of zero,
  5670. + the \fIMMDF\fR values \fIRP_MOK\fR (32) and \fIRP_OK\fR (9)
  5671. + mean that the message has been fully delivered.
  5672. + Any other non-zero exit status,
  5673. + including abnormal termination,
  5674. + is interpreted as the \fIMMDF\fR value \fIRP_MECH\fR (200),
  5675. + which means \*(lquse an alternate route\*(rq
  5676. + (deliver the message to the maildrop).
  5677. + .Bu
  5678. + Only two return codes are meaningful, others should be.
  5679. + \fISlocal\fP is designed to be
  5680. + backwards-compatible with the \fImaildelivery\fP functionality provided
  5681. + by \fBMMDF-II\fP.
  5682. + Versions of \fIMMDF\fR with the \fImaildelivery\fR mechanism aren't
  5683. + entirely backwards-compatible with earlier versions of \fIMMDF\fP.
  5684. + If you have an \fIMMDF-I\fP old-style hook,
  5685. + the best you can do is to have a one-line
  5686. + \fI\&.maildelivery\fR file:
  5687. + .ti +.5i
  5688. + default \- pipe A \*(lqbin/rcvmail $(address) $(info) $(sender)\*(rq
  5689. + .En
  5690. *** ../mh-6.7.2/conf/doc/tmac.h    Mon Jan  7 16:12:51 1991
  5691. --- conf/doc/tmac.h    Fri Oct 30 11:45:38 1992
  5692. ***************
  5693. *** 1,5 ****
  5694.   .\"    @(MHWARNING)
  5695. ! .\" @(#)$Id: tmac.h,v 1.6 91/01/07 16:12:37 mh Exp $
  5696.   .\"    Try to keep only one copy of the documentation around
  5697.   .\"    by re-defining macros and so forth.
  5698.   .\"
  5699. --- 1,5 ----
  5700.   .\"    @(MHWARNING)
  5701. ! .\" @(#)$Id: tmac.h,v 1.7 1992/10/30 19:45:32 jromine Exp $
  5702.   .\"    Try to keep only one copy of the documentation around
  5703.   .\"    by re-defining macros and so forth.
  5704.   .\"
  5705. ***************
  5706. *** 70,73 ****
  5707. --- 70,77 ----
  5708.   .de Uh
  5709.   .ne 4
  5710.   .SS "\\$1"
  5711. + ..
  5712. + .\" a useful -me macro
  5713. + .de re
  5714. + .ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
  5715.   ..
  5716. *** ../mh-6.7.2/conf/doc/vmh.rf    Thu Apr  5 16:05:08 1990
  5717. --- conf/doc/vmh.rf    Tue May 12 15:23:57 1992
  5718. ***************
  5719. *** 1,3 ****
  5720.   .\"    @(MHWARNING)
  5721. ! .\" @(#)$Id: vmh.rf,v 1.5 90/04/05 15:15:32 sources Exp $
  5722.   .SC VMH 1
  5723. --- 1,3 ----
  5724.   .\"    @(MHWARNING)
  5725. ! .\" @(#)$Id: vmh.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
  5726.   .SC VMH 1
  5727. ***************
  5728. *** 4,6 ****
  5729.   .NA
  5730. ! vmh \- visual front\-end to MH
  5731.   .SY
  5732. --- 4,6 ----
  5733.   .NA
  5734. ! vmh \- visual front-end to MH
  5735.   .SY
  5736. *** ../mh-6.7.2/conf/doc/whatnow.rf    Tue Dec 18 15:44:41 1990
  5737. --- conf/doc/whatnow.rf    Fri Oct 16 14:36:33 1992
  5738. ***************
  5739. *** 1,3 ****
  5740.   .\"    @(MHWARNING)
  5741. ! .\" @(#)$Id: whatnow.rf,v 1.7 90/12/18 15:44:22 mh Exp $
  5742.   .SC WHATNOW 1
  5743. --- 1,3 ----
  5744.   .\"    @(MHWARNING)
  5745. ! .\" @(#)$Id: whatnow.rf,v 1.9 1992/10/16 21:36:30 jromine Exp $
  5746.   .SC WHATNOW 1
  5747. ***************
  5748. *** 4,6 ****
  5749.   .NA
  5750. ! whatnow \- prompting front\-end for send
  5751.   .SY
  5752. --- 4,6 ----
  5753.   .NA
  5754. ! whatnow \- prompting front-end for send
  5755.   .SY
  5756. ***************
  5757. *** 91,92 ****
  5758. --- 91,97 ----
  5759.   .Ps
  5760. + @BEGIN: MIME
  5761. + ^automhnproc:~^Program to automatically run prior to sending
  5762. + ^~^if the draft is an \fImhn\fR composition file
  5763. + .Ps
  5764. + @END: MIME
  5765.   ^fileproc:~^Program to refile the message
  5766. *** ../mh-6.7.2/conf/doc/whom.rf    Thu Apr  5 16:04:36 1990
  5767. --- conf/doc/whom.rf    Mon Feb 10 16:48:09 1992
  5768. ***************
  5769. *** 1,3 ****
  5770.   .\"    @(MHWARNING)
  5771. ! .\" @(#)$Id: whom.rf,v 1.6 90/04/05 15:10:01 sources Exp $
  5772.   .SC WHOM 1
  5773. --- 1,3 ----
  5774.   .\"    @(MHWARNING)
  5775. ! .\" @(#)$Id: whom.rf,v 1.7 1992/02/11 00:47:53 jromine Exp $
  5776.   .SC WHOM 1
  5777. ***************
  5778. *** 24,26 ****
  5779.   
  5780. ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
  5781.   additional alias files given by the `\-alias aliasfile' switch will be read
  5782. --- 24,26 ----
  5783.   
  5784. ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
  5785.   additional alias files given by the `\-alias aliasfile' switch will be read
  5786. *** /dev/null    Tue Dec 15 08:01:10 1992
  5787. --- conf/examples/README    Mon Dec 14 10:12:32 1992
  5788. ***************
  5789. *** 0 ****
  5790. --- 1,44 ----
  5791. + $Id: README,v 1.8 1992/12/14 18:12:18 jromine Exp $
  5792. + These files are contributed MH config files from various sites.
  5793. + Newer files give the version of MH and OS release number which
  5794. + they are configured for.
  5795. + # aix.sap-ag.de    - MH 6.8 options for AIX (AIX 3.2 on RS/6000 350).
  5796. + # aix31.rpi.edu    - MH 6.8, RS6000 AIX 3.1 with AFS Kerberos
  5797. + # aos.cornell.edu - MH 6.8 Configuration for IBM/PC-RT running IBM/4.3
  5798. + # aux.rand.org - MH 6.8 under AUX in SYS5 mode
  5799. + # bsd43.uiuc.edu - MH 6.8 VAX running 4.3 BSD-reno
  5800. + # convex.uiuc.edu - MH 6.8 Convex C240 running ConvexOS v9.1
  5801. + # dbc        - DBC's MH 6.8 config file
  5802. + # dynix.uiuc.edu - MH 6.8 Sequent Symmetry running Dynix 3.1.2
  5803. + # encore
  5804. + # fujitsu.clcs.com.au - MH 6.8 for Fujitsu/ICL DRS6000 running System V R4
  5805. + # gould
  5806. + # hplpm.hpl.hp.com - Hewlett-Packard 9000 machines
  5807. + # hpux.sap-ag.de - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
  5808. + # hpux.uiuc.edu    - MH 6.8 HP-9000/700 with HP-UX 8.0 and sendmail
  5809. + # kosciusko.esd.3com.com - SunOS 4.0.3 
  5810. + # krusty.smsc.sony.COM - System V Release 4 running mailsurr
  5811. + # mhmts        - stand-alone mhmts template
  5812. + # mmdf         - template using mts: mmdf
  5813. + # ridge        - ROS
  5814. + # rs6000    - RISC 6000/320, with AIX 3.1 (3.03)
  5815. + # sendmail     - template using mts: sendmail
  5816. + # shrike.irvine.com - MH 6.7.2 - HP 9000/700 HP/UX 8.x sendmail version
  5817. + # solaris2.sun.com - MH 6.8 - Solaris 2.x
  5818. + # sun3.5    - MH 6.8 configuration file for SunOS 3.5
  5819. + # sun4.0    - For Sun OS 4.* with SendMail, Yellow Pages and /etc/named.
  5820. + # sun4.1.1    - MH 6.8 configuration file for SunOS 4.1.1
  5821. + # sun411.rpi.edu - MH 6.8, Sparcstation SunOS 4.1.1 with AFS Kerberos
  5822. + # sys5r3.2    - SVr3.2 configuration file for MH 6.7.1:
  5823. + # sys5r4    - a SYS5 R4 system
  5824. + # sys5r4-ncr    - an NCR system: Unix System V Release 4.0.2.0 (WINS)
  5825. + # system5     - template
  5826. + # uci.gcc    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  5827. + # uci.hp-pa    - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
  5828. + # uci.sequent    - MH 6.8 - Sequent running Dynix 3.1
  5829. + # uci.sun    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  5830. + # uci.sun.debug    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  5831. + # udel        - UDel template
  5832. + # ultrix.sap-ag.de - MH 6.8 options for ULTRIX (ULTRIX 4.2 on RISC).
  5833. *** /dev/null    Tue Dec 15 08:01:10 1992
  5834. --- conf/examples/aix.sap-ag.de    Thu Dec  3 09:30:37 1992
  5835. ***************
  5836. *** 0 ****
  5837. --- 1,18 ----
  5838. + # aix.sap-ag.de    - MH 6.8 options for AIX (AIX 3.2 on RS/6000 350).
  5839. + # Bill Wohler <wohler@sap-ag.de>
  5840. + # Sat, 31 Oct 92 18:45:00 +0100
  5841. + #
  5842. + # General
  5843. + #
  5844. + bin        /usr/local/bin/mh
  5845. + ldoptions    -s
  5846. + mandir        /usr/local/man
  5847. + manuals        standard
  5848. + mts        sendmail/smtp
  5849. + options        BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
  5850. + #
  5851. + # Machine specific options
  5852. + #
  5853. + options        TYPESIG=void SYS5 SYS5DIR SOCKETS
  5854. + curses        -lcurses
  5855. + sprintf        int
  5856. *** /dev/null    Tue Dec 15 08:01:10 1992
  5857. --- conf/examples/aix31.rpi.edu    Fri Dec  4 09:14:24 1992
  5858. ***************
  5859. *** 0 ****
  5860. --- 1,37 ----
  5861. + # aix31.rpi.edu    - MH 6.8, RS6000 AIX 3.1 with AFS Kerberos
  5862. + # Thu, 03 Dec 1992 13:45:09
  5863. + # James Ault <aultj@rpi.EDU>
  5864. + #
  5865. + bin    /campus/other/mh/6.7.1k/@sys/bin
  5866. + debug    off
  5867. + etc    /campus/other/mh/6.7.1k/@sys/lib
  5868. + mail    /usr/spool/mail
  5869. + mailgroup    off
  5870. + mandir    /campus/other/mh/6.7.1k/@sys/man
  5871. + manuals    standard
  5872. + chown    /bin/chown
  5873. + editor    prompter
  5874. + remove    mv -f
  5875. + mts    sendmail
  5876. + bboards    off
  5877. + bbdelivery    off
  5878. + mf    off
  5879. + pop    on 
  5880. + kpop    on
  5881. + hesiod    off
  5882. + options    ATHENA ATZ BIND DBM DUMB FOLDPROT='"0711"' FLOCK 
  5883. + options    MHE MHRC MORE='"/usr/bin/more"' MSGPROT='"0600"' 
  5884. + options    NOMHSEQ OVERHEAD POP2 POPSERVICE='"kpop"' RPATHS 
  5885. + options    RPOP SBACKUP='"\\043"' SOCKETS SYS5 SYS5DIR 
  5886. + options    TYPESIG='void' TZNAME VSPRINTF YP_LOOKUP
  5887. + options    AIX AIX3_1 ISI WP NETWORK KPOP TRANSARC_KAS
  5888. + ccoptions    -O -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void -U__STR__ 
  5889. + ccoptions    -I/campus/athena/kerberos/V4/@sys/include 
  5890. + curses    -lcurses
  5891. + ldoptlibs    -ldbm 
  5892. + ldoptlibs    -L/campus/athena/kerberos/V4/@sys/lib -ldes -lkrb
  5893. + ldoptlibs    -lbsd 
  5894. + ranlib    on
  5895. + sprintf    int
  5896. + sharedlib    off
  5897. *** /dev/null    Tue Dec 15 08:01:10 1992
  5898. --- conf/examples/aos.cornell.edu    Thu Dec  3 09:30:45 1992
  5899. ***************
  5900. *** 0 ****
  5901. --- 1,36 ----
  5902. + # aos.cornell.edu - MH 6.8 Configuration for IBM/PC-RT running IBM/4.3
  5903. + # Jeffrey C Honig <jch@nr-tech.cit.cornell.EDU>
  5904. + # Wed, 02 Dec 92 14:55:44 -0500
  5905. + #
  5906. + #    Configuration for IBM/PC-RT running IBM/4.3
  5907. + #
  5908. + #
  5909. + # System stuff
  5910. + #
  5911. + bin        /usr/local/bin
  5912. + ccoptions    -U__STDC__
  5913. + chown        /etc/chown
  5914. + editor        prompter
  5915. + etc        /usr/local/lib/mh
  5916. + mail        /usr/spool/mail
  5917. + mandir        /usr/local/man
  5918. + manuals        standard
  5919. + mts        sendmail/smtp
  5920. + mf        off
  5921. + options        BSD42 BSD43 BIND NTOHLSWAP DBMPWD LOCKF ZONEINFO
  5922. + options     UCI
  5923. + options        RENAME
  5924. + signal        int
  5925. + #
  5926. + # Options
  5927. + #
  5928. + bboards        off
  5929. + options        MHE MHRC MIME MSGID
  5930. + options     SBACKUP='"\\043"'
  5931. + remove        mv -f
  5932. + #
  5933. + # POP
  5934. + #
  5935. + pop        on
  5936. + popdir        /usr/local/sbin
  5937. + options        RPOP POPSERVICE='"pop3"' DPOP APOP
  5938. *** /dev/null    Tue Dec 15 08:01:10 1992
  5939. --- conf/examples/aux.rand.org    Thu Dec  3 09:35:43 1992
  5940. ***************
  5941. *** 0 ****
  5942. --- 1,34 ----
  5943. + # aux.rand.org - MH 6.8 under AUX in SYS5 mode
  5944. + # Jim Guyton <guyton@condor.rand.ORG>
  5945. + # Thu, 05 Nov 1992 13:59:48 PST
  5946. + #
  5947. + # Note that I don't know what the default locking is on this system.
  5948. + # Iswitched my sendmail to use 'miscellany/sendmail/spooler.c' so that
  5949. + # I could be sure that inc and the delivery program both use the same
  5950. + # lock.  Also note that I'm just starting to use MH on this system and
  5951. + # so this may not be optimal.
  5952. + #
  5953. + bin             /usr/local/bin
  5954. + etc             /usr/local/lib/mh
  5955. + mail            /usr/spool/mail
  5956. + mandir          /usr/local/man
  5957. + manuals         standard
  5958. + chown           /bin/chown
  5959. + remove          mv -f
  5960. + cc              cc
  5961. + ccoptions       -ZS -A 2
  5962. + curses          -lcurses -ltermcap
  5963. + ldoptions       -s
  5964. + ranlib          off
  5965. + sprintf         int
  5966. + mts             sendmail/smtp
  5967. + signal          int
  5968. + # options        BIND
  5969. + options         AUX
  5970. + options         DUMB FLOCK MHRC
  5971. + options         MIME NFS
  5972. + options         MORE='"/bin/more"' MSGID
  5973. + options         OVERHEAD RENAME RPATHS
  5974. + options         SOCKETS SYS5 SYS5DIR
  5975. + options         VSPRINTF
  5976. *** /dev/null    Tue Dec 15 08:01:10 1992
  5977. --- conf/examples/bsd43.uiuc.edu    Mon Dec 14 10:07:37 1992
  5978. ***************
  5979. *** 0 ****
  5980. --- 1,39 ----
  5981. + # bsd43.uiuc.edu - MH 6.8 VAX running 4.3 BSD-reno
  5982. + # Paul Pomes - UofIllinois CSO <Paul-Pomes@uiuc.EDU>
  5983. + # Fri, 11 Dec 1992 22:28:58 -0600
  5984. + #
  5985. + bboards    off
  5986. + bin    /usr/local/bin
  5987. + cc    gcc -fpcc-struct-return
  5988. + etc    /usr/local/libdata/mh
  5989. + ldoptlibs    -lcompat
  5990. + lex    /usr/old/lex -nt
  5991. + mail    /var/spool/mail
  5992. + mandir    /usr/local/src/man
  5993. + manuals    standard
  5994. + mts    sendmail/smtp
  5995. + pop    off
  5996. + ranlib    on
  5997. + remove    rm -f
  5998. + signal    void
  5999. + sprintf    int
  6000. + options    BIND
  6001. + options    BSD42
  6002. + options    BSD43
  6003. + options    DBMPWD
  6004. + options    DUMB
  6005. + options    FLOCK
  6006. + options    FOLDPROT='"700"'
  6007. + options    MHE
  6008. + options    MHRC
  6009. + options    MIME
  6010. + options    MSGID
  6011. + options    MSGPROT='"600"'
  6012. + options    NTOHLSWAP
  6013. + options    OVERHEAD
  6014. + options    RENAME
  6015. + options    RPATHS
  6016. + options    SBACKUP='"\\043"'
  6017. + options    UNISTD
  6018. + options    VSPRINTF
  6019. + options    ZONEINFO
  6020. *** /dev/null    Tue Dec 15 08:01:10 1992
  6021. --- conf/examples/convex.uiuc.edu    Mon Dec 14 16:01:16 1992
  6022. ***************
  6023. *** 0 ****
  6024. --- 1,38 ----
  6025. + # convex.uiuc.edu - MH 6.8 Convex C240 running ConvexOS v9.1
  6026. + # Fri, 11 Dec 1992 17:32:53 -0600
  6027. + # Paul Pomes <Paul-Pomes@uiuc.EDU>
  6028. + #
  6029. + bboards    off
  6030. + bin    /usr/local/new
  6031. + etc    /usr/local/libdata/mh
  6032. + mail    /usr/spool/mail
  6033. + mandir    /usr/man
  6034. + manuals    local
  6035. + manuals    standard
  6036. + mts    sendmail/smtp
  6037. + pop    off
  6038. + ranlib    on
  6039. + remove    rm -f
  6040. + signal    void
  6041. + sprintf    char *
  6042. + options    BIND
  6043. + options    BSD42
  6044. + options    BSD43
  6045. + options    DBMPWD
  6046. + options    DUMB
  6047. + options    FLOCK
  6048. + options    FOLDPROT='"700"'
  6049. + options    MHE
  6050. + options    MHRC
  6051. + options    MIME
  6052. + options    MSGID
  6053. + options    MSGPROT='"600"'
  6054. + options    NFS
  6055. + options    NTOHLSWAP
  6056. + options    OVERHEAD
  6057. + options    RENAME
  6058. + options    RPATHS
  6059. + options    SBACKUP='"\\043"'
  6060. + options    UNISTD
  6061. + options    VSPRINTF
  6062. + options    WAITINT
  6063. *** /dev/null    Tue Dec 15 08:01:10 1992
  6064. --- conf/examples/dbc    Wed Dec  2 13:35:15 1992
  6065. ***************
  6066. *** 0 ****
  6067. --- 1,23 ----
  6068. + # dbc        - DBC's MH 6.8 config file
  6069. + # SunOS 4.1.1 rev B
  6070. + # Wed, 02 Dec 1992 12:40:42 PST
  6071. + # Marshall Rose <mrose@dbc.mtview.ca.us>
  6072. + #
  6073. + options SUN40 BSD42 BSD43
  6074. + options    BIND MIME MSGID RPATHS UCI WHATNOW
  6075. + #
  6076. + bboards    pop
  6077. + bin    /usr/local/bin
  6078. + curses    -lcurses -ltermcap
  6079. + etc    /usr/local/lib/mh
  6080. + ldoptions -s -O
  6081. + mail    .maildrop
  6082. + mandir    /usr/local/man
  6083. + manuals    standard
  6084. + editor    prompter
  6085. + mts    zmailer/smtp
  6086. + pop    on
  6087. + options    APOP='"/etc/pop.auth"' MPOP
  6088. + options    POPSERVICE='"pop3"'
  6089. + ranlib    on
  6090. + signal    void
  6091. *** /dev/null    Tue Dec 15 08:01:10 1992
  6092. --- conf/examples/dynix.uiuc.edu    Fri Dec 11 13:33:20 1992
  6093. ***************
  6094. *** 0 ****
  6095. --- 1,36 ----
  6096. + # dynix.uiuc.edu - MH 6.8 Sequent Symmetry running Dynix 3.1.2
  6097. + # Fri, 11 Dec 1992 14:06:09 CST
  6098. + # Paul Pomes <Paul-Pomes@uiuc.EDU>
  6099. + #
  6100. + bin    /usr/local/new
  6101. + bboards    off
  6102. + cc    gcc -fpcc-struct-return
  6103. + etc    /usr/local/libdata/mh
  6104. + mail    /usr/spool/mail
  6105. + mandir    /usr/man
  6106. + manuals    local
  6107. + mts    sendmail/smtp
  6108. + pop    off
  6109. + remove    rm -f
  6110. + ranlib    on
  6111. + signal    int
  6112. + sprintf    char *
  6113. + options    BIND
  6114. + options    BSD42
  6115. + options    BSD43
  6116. + options    DUMB
  6117. + options    FLOCK
  6118. + options    FOLDPROT='"700"'
  6119. + options    MHE
  6120. + options    MHRC
  6121. + options    MIME
  6122. + options    MSGID
  6123. + options    MSGPROT='"600"'
  6124. + options    NTOHLSWAP
  6125. + options    OVERHEAD
  6126. + options    RENAME
  6127. + options    RPATHS
  6128. + options    SBACKUP='"\\043"'
  6129. + options    UNISTD
  6130. + options    VSPRINTF
  6131. + options    ZONEINFO
  6132. *** ../mh-6.7.2/conf/examples/encore    Fri Apr  6 09:21:02 1990
  6133. --- conf/examples/encore    Fri Dec  4 09:17:57 1992
  6134. ***************
  6135. *** 1 ****
  6136. --- 1,2 ----
  6137. + # encore
  6138.   bin    /usr/local
  6139. *** /dev/null    Tue Dec 15 08:01:10 1992
  6140. --- conf/examples/fujitsu.clcs.com.au    Thu Dec 10 11:47:28 1992
  6141. ***************
  6142. *** 0 ****
  6143. --- 1,28 ----
  6144. + # fujitsu.clcs.com.au - MH 6.8 for Fujitsu/ICL DRS6000 running System V R4
  6145. + # [This is known to work with OS Versions: 4.03 and 5.1.04]
  6146. + #
  6147. + # From: Stephen Prince <sp@clcs.com.au>
  6148. + # Date: Tue, 08 Dec 1992 10:47:02 +1100
  6149. + #
  6150. + bin        /usr/local/bin/mh
  6151. + etc        /usr/local/lib/mh
  6152. + bboards        off
  6153. + mail        /var/mail
  6154. + mailgroup    mail
  6155. + manuals        gen
  6156. + mandir        /usr/local/man
  6157. + mts        sendmail/smtp
  6158. + options        ATTVIBUG BIND FCNTL SYS5 SYS5DIR SVR4 NFS
  6159. + options        SOCKETS SHADOW BERK MHRC MIME RPATHS RENAME
  6160. + options        VSPRINTF ZONEINFO FOLDPROT='"0750"' UNISTD
  6161. + options        MORE='"/usr/local/bin/less"'
  6162. + signal        void
  6163. + pop        off
  6164. + ranlib        off
  6165. + oldload        none
  6166. + curses        -lcurses
  6167. + ldoptlibs    -lsocket -lnsl
  6168. + ccoptions    -O -I/usr/include -I/usr/ucbinclude
  6169. + sharedlib    sys5
  6170. + slibdir        /usr/lib
  6171. + slflags        -K pic
  6172. *** ../mh-6.7.2/conf/examples/gould    Thu Oct 29 14:55:39 1987
  6173. --- conf/examples/gould    Fri Dec  4 09:18:01 1992
  6174. ***************
  6175. *** 1 ****
  6176. --- 1,2 ----
  6177. + # gould
  6178.   bin    /usr/local
  6179. *** ../mh-6.7.2/conf/examples/hplpm.hpl.hp.com    Thu Apr 12 13:21:53 1990
  6180. --- conf/examples/hplpm.hpl.hp.com    Thu Dec  3 09:31:08 1992
  6181. ***************
  6182. *** 1 ****
  6183. --- 1,2 ----
  6184. + # hplpm.hpl.hp.com - Hewlett-Packard 9000 machines
  6185.   # From:    Peter Marvit <marvit%hplpm.hpl.hp.com@hplb.hpl.hp.COM>
  6186. *** /dev/null    Tue Dec 15 08:01:10 1992
  6187. --- conf/examples/hpux.sap-ag.de    Thu Dec  3 09:31:34 1992
  6188. ***************
  6189. *** 0 ****
  6190. --- 1,19 ----
  6191. + # hpux.sap-ag.de - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
  6192. + # Bill Wohler <wohler@sap-ag.de>
  6193. + # Sat, 31 Oct 92 19:16:29 +0100
  6194. + #
  6195. + # General
  6196. + #
  6197. + bin        /usr/local/bin/mh
  6198. + ldoptions    -s
  6199. + mandir        /usr/local/man
  6200. + manuals        standard
  6201. + mts        sendmail/smtp
  6202. + options        BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
  6203. + #
  6204. + # Machine specific options
  6205. + #
  6206. + ccoptions    +DA1.0 +DS1.0
  6207. + options        TYPESIG=void SYS5 NDIR SOCKETS _STRINGS
  6208. + curses        -lcurses -ltermlib
  6209. + sprintf        int
  6210. *** /dev/null    Tue Dec 15 08:01:10 1992
  6211. --- conf/examples/hpux.uiuc.edu    Fri Dec 11 13:33:12 1992
  6212. ***************
  6213. *** 0 ****
  6214. --- 1,41 ----
  6215. + # hpux.uiuc.edu    - MH 6.8 HP-9000/700 with HP-UX 8.0 and sendmail
  6216. + # Fri, 11 Dec 1992 14:06:09 CST
  6217. + # Paul Pomes <Paul-Pomes@uiuc.EDU>
  6218. + #
  6219. + bin    /usr/local/bin
  6220. + bboards    off
  6221. + etc    /usr/local/lib/mh
  6222. + ldoptlibs    -ldbm
  6223. + mail    /usr/mail
  6224. + mandir    /usr/local/man
  6225. + mailgroup    mail
  6226. + manuals    standard
  6227. + mts    sendmail/smtp
  6228. + pop    off
  6229. + remove    rm -f
  6230. + signal    void
  6231. + sprintf int
  6232. + options    BIND
  6233. + options    DBMPWD
  6234. + options    DUMB
  6235. + options    FOLDPROT='"700"'
  6236. + options    LOCKF
  6237. + options    MHE
  6238. + options    MHRC
  6239. + options    MIME
  6240. + options    MORE='"/usr/bin/more"'
  6241. + options    MSGID
  6242. + options    MSGPROT='"600"'
  6243. + options    OVERHEAD
  6244. + options    RENAME
  6245. + options    RPATHS
  6246. + options    SBACKUP='"\\043"'
  6247. + options    SOCKETS
  6248. + options    SVR4
  6249. + options    SYS5
  6250. + options    SYS5DIR
  6251. + options    TERMINFO
  6252. + options    TZNAME
  6253. + options    UNISTD
  6254. + options    VSPRINTF
  6255. + options NTOHLSWAP
  6256. *** ../mh-6.7.2/conf/examples/kosciusko.esd.3com.com    Sun Apr  8 12:59:55 1990
  6257. --- conf/examples/kosciusko.esd.3com.com    Thu Dec  3 09:31:51 1992
  6258. ***************
  6259. *** 1 ****
  6260. --- 1,2 ----
  6261. + # kosciusko.esd.3com.com - SunOS 4.0.3 
  6262.   # From: "Mark D. Baushke" <mdb@kosciusko.ESD.3Com.COM>
  6263. ***************
  6264. *** 29,31 ****
  6265.   options    BSD42 BSD43 SUN40 DUMB ATHENA
  6266. ! options    MHE MHRC NFS BIND DBM
  6267.   options    SBACKUP='"\\043"' OVERHEAD
  6268. --- 30,32 ----
  6269.   options    BSD42 BSD43 SUN40 DUMB ATHENA
  6270. ! options    MHE MHRC NFS BIND DBMPWD
  6271.   options    SBACKUP='"\\043"' OVERHEAD
  6272. *** /dev/null    Tue Dec 15 08:01:10 1992
  6273. --- conf/examples/krusty.smsc.sony.COM    Thu Dec  3 09:32:02 1992
  6274. ***************
  6275. *** 0 ****
  6276. --- 1,22 ----
  6277. + # krusty.smsc.sony.COM - System V Release 4 running mailsurr
  6278. + #
  6279. + # David Elliott 1990, 1991
  6280. + #
  6281. + #
  6282. + bin   /usr/local/bin/mh
  6283. + etc   /usr/local/lib/mh
  6284. + mail  /usr/mail
  6285. + chown /bin/chown
  6286. + manuals       gen
  6287. + mts   sendmail/smtp
  6288. + sprintf       int
  6289. + ldoptlibs     -lsocket -lnsl -lgen
  6290. + curses        -lcurses
  6291. + ranlib        off
  6292. + options    ATTVIBUG
  6293. + options    MORE='"/bin/more"'
  6294. + options    SOCKETS
  6295. + options    SYS5
  6296. + options    SYS5DIR
  6297. + options    SVR4
  6298. + options    TYPESIG=void
  6299. *** ../mh-6.7.2/conf/examples/mhmts    Fri Apr  6 09:22:28 1990
  6300. --- conf/examples/mhmts    Thu Dec  3 09:39:28 1992
  6301. ***************
  6302. *** 1 ****
  6303. --- 1,2 ----
  6304. + # mhmts        - stand-alone mhmts template
  6305.   bin    /usr/local
  6306. *** ../mh-6.7.2/conf/examples/mmdf    Fri Apr  6 09:22:32 1990
  6307. --- conf/examples/mmdf    Thu Dec  3 09:39:12 1992
  6308. ***************
  6309. *** 1 ****
  6310. --- 1,2 ----
  6311. + # mmdf         - template using mts: mmdf
  6312.   bin    /usr/local
  6313. *** ../mh-6.7.2/conf/examples/ridge    Fri Apr  6 09:23:35 1990
  6314. --- conf/examples/ridge    Fri Dec  4 09:18:06 1992
  6315. ***************
  6316. *** 1 ****
  6317. --- 1,2 ----
  6318. + # ridge        - ROS
  6319.   bin    /usr/local/bin
  6320. *** /dev/null    Tue Dec 15 08:01:10 1992
  6321. --- conf/examples/rs6000    Thu Dec  3 09:32:23 1992
  6322. ***************
  6323. *** 0 ****
  6324. --- 1,34 ----
  6325. + # rs6000    - RISC 6000/320, with AIX 3.1 (3.03)
  6326. + #
  6327. + bin   /usr/local/bin
  6328. + etc   /usr/local/lib/mh
  6329. + chown /bin/chown
  6330. + mail  /usr/spool/mail
  6331. + mandir        /usr/local/man
  6332. + manuals       standard
  6333. + mts   sendmail/smtp
  6334. + pop   off
  6335. + options       AIX AIX3_1 TYPESIG=void SYS5 SYS5DIR
  6336. + options       ATZ
  6337. + options       BIND
  6338. + options       DBMPWD
  6339. + options       MHE
  6340. + options       MHRC
  6341. + options       NETWORK
  6342. + options       NTOHLSWAP
  6343. + options       OVERHEAD
  6344. + options       RPATHS
  6345. + options       SOCKETS
  6346. + options       TZNAME
  6347. + options       WHATNOW
  6348. + options       SBACKUP='"\\043"'
  6349. + options       MSGPROT='"0600"'
  6350. + options       FOLDPROT='"0710"'
  6351. + options       NFOLDERS=500
  6352. + bboards               off
  6353. + curses                -lcurses
  6354. + ccoptions     -g -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void -U__STR__
  6355. + ldoptions     -g
  6356. + ranlib                on
  6357. + sprintf               int
  6358. *** ../mh-6.7.2/conf/examples/sendmts    Fri Apr  6 09:22:36 1990
  6359. --- conf/examples/sendmts    Thu Dec  3 09:39:21 1992
  6360. ***************
  6361. *** 1 ****
  6362. --- 1,2 ----
  6363. + # sendmail     - template using mts: sendmail
  6364.   bin    /usr/local
  6365. *** /dev/null    Tue Dec 15 08:01:10 1992
  6366. --- conf/examples/shrike.irvine.com    Thu Dec  3 09:32:33 1992
  6367. ***************
  6368. *** 0 ****
  6369. --- 1,50 ----
  6370. + # shrike.irvine.com - MH 6.7.2 - HP 9000/700 HP/UX 8.x sendmail version
  6371. + # contributed by Jerry Sweet <jsweet@irvine.COM>
  6372. + #
  6373. + # Notes:
  6374. + #    1. Make sure you're using /bin/make, and not GNU Make.
  6375. + #
  6376. + #    2. You may have to modify h/string.h where strlen is declared as follows:
  6377. + #
  6378. + #    #if defined(hpux)
  6379. + #    /* size_t  strlen (); */
  6380. + #    #else
  6381. + #    int     strlen ();
  6382. + #    #endif
  6383. + #
  6384. + #    3. vmh.c won't compile.  (Sorry, don't have any patches yet for that.)
  6385. + #
  6386. + #
  6387. + bin    /usr/local/bin/mh-6.7.2
  6388. + etc    /usr/local/lib/mh-6.7.2
  6389. + mail    /usr/spool/mail
  6390. + mandir    /usr/local/man
  6391. + manuals    standard
  6392. + chown    /bin/chown
  6393. + editor    prompter
  6394. + remove    mv -f
  6395. + mts    sendmail/smtp
  6396. + pop    on
  6397. + options    ATHENA
  6398. + options    ATZ
  6399. + options    BIND
  6400. + options    MHE
  6401. + options    MHRC
  6402. + options    MORE='"/usr/bin/more"'
  6403. + options    MSGPROT='"0600"'
  6404. + options    NDIR
  6405. + options    NTOHLSWAP
  6406. + options    POPUUMBOX
  6407. + options    SOCKETS
  6408. + options    SYS5
  6409. + options    TZNAME
  6410. + options    TYPESIG=void
  6411. + options    VSPRINTF
  6412. + options    WHATNOW
  6413. + options    DPOP
  6414. + options    RPOP
  6415. + options    POP2
  6416. + options    POPSERVICE='"pop3"'
  6417. + ccoptions -O
  6418. + curses    -lcurses -ltermlib
  6419. + sprintf    int
  6420. *** /dev/null    Tue Dec 15 08:01:10 1992
  6421. --- conf/examples/solaris2.sun.com    Thu Dec  3 09:32:46 1992
  6422. ***************
  6423. *** 0 ****
  6424. --- 1,54 ----
  6425. + # solaris2.sun.com - MH 6.8 - Solaris 2.x
  6426. + # Solaris 2.x (native, no source/binary compatability)
  6427. + # contributed by Greg.Onufer@cheers.Bungi.COM
  6428. + # Wed, 11 Nov 1992 00:43:19 PST
  6429. + # Bulletin Boards
  6430. + bbdelivery      off
  6431. + bboards         off
  6432. + # Compilation Environment
  6433. + cc              cc
  6434. + ccoptions       -O -g
  6435. + curses          -lcurses
  6436. + # ldoptions may also need -R/opt/mh/lib
  6437. + ldoptions       -s
  6438. + ldoptlibs       -lnsl -lsocket
  6439. + sharedlib       sys5
  6440. + slflags         -K pic
  6441. + ranlib          off
  6442. + chown           /usr/bin/chown
  6443. + oldload         none
  6444. + # RunTime Environment
  6445. + bin             /opt/mh/bin
  6446. + etc             /opt/mh/lib
  6447. + slibdir         /opt/mh/lib
  6448. + mandir          /opt/mh/man
  6449. + manuals         standard
  6450. + editor          /usr/bin/vi
  6451. + mail            /var/mail
  6452. + mts             sendmail/smtp
  6453. + # Compilation Options
  6454. + options SYS5
  6455. + options SVR4
  6456. + options FCNTL
  6457. + options RENAME
  6458. + options VSPRINTF
  6459. + options ATTVIBUG
  6460. + options DBMPWD
  6461. + options DUMB
  6462. + options MORE='"/usr/bin/more"'
  6463. + options MSGPROT='"0600"'
  6464. + options MSGID
  6465. + options RPATHS
  6466. + options SOCKETS
  6467. + options FOLDPROT='"0711"'
  6468. + options SHADOW
  6469. + options SYS5DIR
  6470. + options MHRC
  6471. + options MHE
  6472. + options MIME
  6473. + signal  void
  6474. + sprintf int
  6475. *** /dev/null    Tue Dec 15 08:01:10 1992
  6476. --- conf/examples/sun3.5    Thu Dec  3 09:33:01 1992
  6477. ***************
  6478. *** 0 ****
  6479. --- 1,40 ----
  6480. + # sun3.5    - MH 6.8 configuration file for SunOS 3.5
  6481. + # Fri, 28 Feb 1992 00:49:32 -0800
  6482. + # Casey Leedom <casey@gauss.llnl.GOV>
  6483. + #
  6484. + #
  6485. + # Options required by SunOS 3.5.  (You can use FLOCK instead of LOCKF
  6486. + # if you don't have multiple machine mounting mail spools with NFS.)
  6487. + #
  6488. + mts    sendmail/smtp
  6489. + options    BIND BSD42 DBMPWD LOCKF
  6490. + curses    -lcurses -ltermcap
  6491. + sprintf    int
  6492. + #
  6493. + # Site preference options.
  6494. + #
  6495. + # Note that if you choose not to use the option "BERK" and you use Domain
  6496. + # Name Service via NIS, then you'd better add "ldoptlibs -lresolv" to
  6497. + # prevent post(1) from hanging on hosts with MX records and no address
  6498. + # records.  (No, you really don't want to know why.)
  6499. + #
  6500. + # Also, under SunOS 3.5 you'll need to add "ccoptions -I../h -I../../h
  6501. + # -I../../../h" because the supplied libresolv.a under SunOS 3.5 uses the
  6502. + # newer BSD4.3 based hostent structure which is different from the BSD4.2
  6503. + # based hostent structure declared in /usr/include/netdb.h.  Why does adding
  6504. + # this help?  There's a version of netdb.h in ../h that has the BSD4.3 based
  6505. + # hostent structure.  We need to use all the different forms of ../h because
  6506. + # the MH makefile system doesn't offer a $(TOP) variable like the X Windows
  6507. + # Makefile system ...  (sigh) I told you that you didn't want to know about
  6508. + # any of this ...
  6509. + #
  6510. + bin    /usr/local/bin/mh
  6511. + etc    /usr/local/lib/mh
  6512. + mail    /usr/spool/mail
  6513. + manuals    local
  6514. + options    FOLDPROT='"0700"' MHE MHRC MSGPROT='"0644"' NTOHLSWAP OVERHEAD RPATHS
  6515. + ldoptions -s
  6516. + ldoptlibs -lresolv
  6517. + ccoptions -I../h -I../../h -I../../../h
  6518. *** ../mh-6.7.2/conf/examples/sun4.0    Fri Apr  6 09:44:46 1990
  6519. --- conf/examples/sun4.0    Thu Dec  3 09:33:20 1992
  6520. ***************
  6521. *** 1,2 ****
  6522. ! # For Sun OS 4.* with SendMail, running Yellow Pages, and /etc/named.
  6523.   # MH will post mail through an SMTP connection to the localhost's
  6524. --- 1,2 ----
  6525. ! # sun4.0    - For Sun OS 4.* with SendMail, Yellow Pages and /etc/named.
  6526.   # MH will post mail through an SMTP connection to the localhost's
  6527. ***************
  6528. *** 11,13 ****
  6529.   options    BSD42 BSD43 SUN40 TYPESIG=void
  6530. ! options    DBM
  6531.   options BIND
  6532. --- 11,13 ----
  6533.   options    BSD42 BSD43 SUN40 TYPESIG=void
  6534. ! options    DBMPWD
  6535.   options BIND
  6536. *** /dev/null    Tue Dec 15 08:01:10 1992
  6537. --- conf/examples/sun4.1.1    Thu Dec  3 09:33:29 1992
  6538. ***************
  6539. *** 0 ****
  6540. --- 1,29 ----
  6541. + # sun4.1.1    - MH 6.8 configuration file for SunOS 4.1.1
  6542. + # Fri, 28 Feb 1992 00:49:32 -0800
  6543. + # Casey Leedom <casey@gauss.llnl.GOV>
  6544. + #
  6545. + #
  6546. + # Options required by SunOS 4.1.1.  (You can use FLOCK instead of LOCKF
  6547. + # if you don't have multiple machine mounting mail spools with NFS.)
  6548. + #
  6549. + mts    sendmail/smtp
  6550. + options    ATTVIBUG BIND BSD42 BSD43 DBMPWD
  6551. + options    LOCKF SUN40 SUN41 TYPESIG=void ZONEINFO
  6552. + curses    -lcurses -ltermcap
  6553. + #
  6554. + # Site preference options.
  6555. + #
  6556. + # Note that if you choose not to use the option "BERK" and you use Domain
  6557. + # Name Service via NIS, then you'd better add "ldoptlibs -lresolv" to
  6558. + # prevent post(1) from hanging on hosts with MX records and no address
  6559. + # records.  (No, you really don't want to know why.)
  6560. + #
  6561. + bin    /usr/local/bin/mh
  6562. + etc    /usr/local/lib/mh
  6563. + mail    /usr/spool/mail
  6564. + manuals    local
  6565. + options    FOLDPROT='"0700"' MHE MHRC MSGPROT='"0644"' NTOHLSWAP OVERHEAD RPATHS
  6566. + ldoptions -s
  6567. + ldoptlibs -lresolv
  6568. *** /dev/null    Tue Dec 15 08:01:10 1992
  6569. --- conf/examples/sun411.rpi.edu    Fri Dec  4 09:15:40 1992
  6570. ***************
  6571. *** 0 ****
  6572. --- 1,35 ----
  6573. + # sun411.rpi.edu - MH 6.8, Sparcstation SunOS 4.1.1 with AFS Kerberos
  6574. + # Thu, 03 Dec 1992 13:45:09
  6575. + # James Ault <aultj@rpi.EDU>
  6576. + #
  6577. + bin    /campus/other/mh/6.7.1k/@sys/bin
  6578. + etc    /campus/other/mh/6.7.1k/@sys/lib
  6579. + mail    /usr/spool/mail
  6580. + mailgroup    off
  6581. + mandir    /campus/other/mh/6.7.1k/@sys/man
  6582. + manuals    standard
  6583. + chown    /etc/chown
  6584. + editor    prompter
  6585. + remove    mv -f
  6586. + mts    sendmail
  6587. + bboards    off
  6588. + bbdelivery    off
  6589. + mf    off
  6590. + pop    on
  6591. + kpop    on
  6592. + hesiod    off
  6593. + options    ATHENA ATTVIBUG ATZ BIND BSD42 BSD43 DBM DUMB 
  6594. + options    FOLDPROT='"0711"' FLOCK MHE MHRC MSGPROT='"0600"' 
  6595. + options    NOMHSEQ OVERHEAD POP2 POPSERVICE='"kpop"' RPATHS
  6596. + options    RPOP KPOP TRANSARC_KAS SBACKUP='"\\043"' 
  6597. + options    SUN40 SUN41 TYPESIG='void' TZNAME ZONEINFO 
  6598. + options    ISI WP YP_LOOKUP
  6599. + ccoptions    -O -I/campus/athena/kerberos/V4/@sys/include 
  6600. + curses        -lcurses -ltermcap
  6601. + ldoptions    -n 
  6602. + ldoptlibs    -L/campus/athena/kerberos/V4/@sys/lib -lkrb -ldes
  6603. + ldoptlibs    -L/campus/bsd/bind/4.8.3/@sys/lib -lresolv
  6604. + lex    lex -nt
  6605. + sprintf    int
  6606. + ranlib    on
  6607. + sharedlib    off
  6608. *** /dev/null    Tue Dec 15 08:01:10 1992
  6609. --- conf/examples/sys5r3.2    Thu Dec  3 09:33:38 1992
  6610. ***************
  6611. *** 0 ****
  6612. --- 1,60 ----
  6613. + # sys5r3.2    - SVr3.2 configuration file for MH 6.7.1:
  6614. + #
  6615. + #   conf/MH configuration file for MH-6.7 to be used on:
  6616. + #       AT&T Unix System V.3.2 with BSD4.3-compatible sockets
  6617. + #
  6618. + #   the items are listed in the order they appear in mh-gen(8)
  6619. + #
  6620. + bin             /usr/local/bin
  6621. + debug           off
  6622. + etc             /usr/local/lib/mh
  6623. + mail            /usr/mail
  6624. + mailgroup       mail
  6625. + mandir          /usr/man
  6626. + manuals         gen
  6627. + chown           /bin/chown
  6628. + editor          prompter
  6629. + remove          /bin/mv -f
  6630. + # if no TCP/IP sendmail is available: change mts entry to sendmail
  6631. + mts             sendmail/smtp
  6632. + bboards         off
  6633. + bbdelivery      off
  6634. + bbhome          /usr/spool/bboards
  6635. + mf              off
  6636. + pop             off
  6637. + # options       SEE BELOW
  6638. + cc              cc
  6639. + ccoptions       -O
  6640. + curses          -lcurses
  6641. + ldoptions       -s
  6642. + ldoptlibs
  6643. + lex             lex
  6644. + sprintf         int
  6645. + sharedlib       off
  6646. + slibdir         /usr/local/lib
  6647. + oldload         off
  6648. + ranlib          off
  6649. + tma             off
  6650. + #
  6651. + #   complete list of possible macros for use with 'options':
  6652. + #       ALTOS ATHENA ATZ BANG BERK BIND BSD41A BSD42 BSD43 COMPAT
  6653. + #       DBMPWD DPOP DUMB FOLDPROT='"0711"' ISI LINK='"@"' locname
  6654. + #       MHE MHRC MORE='"/usr/ucb/more"' MSGPROT='"0644"' NDIR NFS
  6655. + #       NOIOCTLH NOMHSEQ NTOHLSWAP OVERHEAD POPSERVICE='"pop"'
  6656. + #       RPATHS RPOP SBACKUP='","' SENDMAILBUG SHADOW SOCKETS
  6657. + #       SUN40 SYS5 SYS5DIR TTYD TYPESIG='int' TZNAME UCI UK V7 WP
  6658. + #       WHATNOW ZONEINFO
  6659. + #
  6660. + # define BIND only of the BSD4.3 named (TCP/IP) is used
  6661. + # define SOCKETS only if the system has BSD4.3 sockets (TCP/IP)
  6662. + options         ATZ BIND DUMB MHE MHRC MORE='"/usr/bin/pg"'
  6663. + options         OVERHEAD SHADOW SOCKETS SYS5 SYS5DIR
  6664. + options         TYPESIG='void' TZNAME WHATNOW
  6665. + #
  6666. + #   end of conf/MH configuration file
  6667. + #
  6668. *** /dev/null    Tue Dec 15 08:01:10 1992
  6669. --- conf/examples/sys5r4    Thu Dec  3 09:33:44 1992
  6670. ***************
  6671. *** 0 ****
  6672. --- 1,28 ----
  6673. + # sys5r4    - a SYS5 R4 system
  6674. + # contributed by andrew@werple.pub.uu.oz.au
  6675. + #
  6676. + bin    /usr/local/bin
  6677. + etc    /usr/local/lib/mh
  6678. + bboards    on
  6679. + chown    /usr/bin/chown
  6680. + editor    /usr/bin/vi
  6681. + mail    /var/mail
  6682. + mandir    /usr/local/man
  6683. + manuals    local
  6684. + mts    sendmail
  6685. + options    BSD42
  6686. + options    MORE='"/usr/local/bin/less"'
  6687. + options    MSGPROT='"0600"'SHADOW
  6688. + options    SYS5
  6689. + options    SVR4
  6690. + options    SYS5DIR
  6691. + options    TYPESIG=void
  6692. + options    UK
  6693. + options    on
  6694. + sprintf    int
  6695. + cc    cc
  6696. + ccoptions -O
  6697. + ldoptions -s
  6698. + curses    -lcurses
  6699. + sharedlib sys5
  6700. + slibdir    /usr/local/lib/mh
  6701. *** /dev/null    Tue Dec 15 08:01:10 1992
  6702. --- conf/examples/sys5r4-ncr    Thu Dec  3 09:33:51 1992
  6703. ***************
  6704. *** 0 ****
  6705. --- 1,34 ----
  6706. + # sys5r4-ncr    - an NCR system: Unix System V Release 4.0.2.0 (WINS)
  6707. + # running MMDF2 with SMTP posting
  6708. + #
  6709. + # Apparently, there are two compilation environments: 4.2BSD and SYS5.
  6710. + # This config file uses the SYS5 environment -- I never could get the
  6711. + # 4.2BSD environment directory routines to work right.
  6712. + #
  6713. + # You may want to define SVR4; this option was added after MH was
  6714. + # ported to the NCR, and I haven't been able to test it there.
  6715. + #
  6716. + # uip/vmh.c still won't compile because of loader problems with the
  6717. + # curses & termlib libraries.  Also, NCR should fix their loader not to try
  6718. + # to search additional libraries for modules that have already been found.
  6719. + #
  6720. + bin    /usr/local
  6721. + etc    /usr/local/lib/mh
  6722. + mail    .mail
  6723. + manuals    gen
  6724. + chown   /usr/bin/chown
  6725. + mts    mmdf2/smtp
  6726. + mf    off
  6727. + ranlib  off
  6728. + bboards off
  6729. + bbdelivery off
  6730. + oldload none
  6731. + cc    /bin/cc
  6732. + ldoptlibs -lnet -lnsl -lsocket
  6733. + options    MORE='"/usr/bin/more"'
  6734. + options    ncr
  6735. + options SYS5
  6736. + options    SYS5DIR 
  6737. + options    SOCKETS
  6738. + options    TZNAME
  6739. + options TYPESIG=void
  6740. *** ../mh-6.7.2/conf/examples/system5    Fri Apr  6 09:23:13 1990
  6741. --- conf/examples/system5    Fri Dec  4 09:18:48 1992
  6742. ***************
  6743. *** 1 ****
  6744. --- 1,2 ----
  6745. + # system5     - template
  6746.   bin    /usr/local
  6747. *** /dev/null    Tue Dec 15 08:01:10 1992
  6748. --- conf/examples/uci.gcc    Thu Dec  3 09:34:15 1992
  6749. ***************
  6750. *** 0 ****
  6751. --- 1,49 ----
  6752. + # uci.gcc    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  6753. + #
  6754. + bin    /usr/bs/mh-6.8/bin
  6755. + etc    /usr/bs/mh-6.8/lib
  6756. + popdir    /usr/bs/mh-6.8/lib
  6757. + mandir    /usr/bs/mh-6.8/man
  6758. + slibdir    /usr/bs/mh-6.8/lib
  6759. + bbhome    /usr/bs/mh-6.8/bboards
  6760. + mail    /usr/spool/mail
  6761. + mailgroup    off
  6762. + manuals        none
  6763. + chown    /etc/chown
  6764. + editor    prompter
  6765. + remove    rm -f
  6766. + mts    mmdf2/smtp
  6767. + bboards    nntp
  6768. + bbdelivery off
  6769. + mf    off
  6770. + pop    on
  6771. + options    BIND
  6772. + options    BSD42 
  6773. + options    BSD43 
  6774. + #options    LOCKF
  6775. + options    MHE
  6776. + options    MHRC 
  6777. + options    RPATHS
  6778. + options    WHATNOW
  6779. + options    MIME
  6780. + options UCI
  6781. + options    POP2
  6782. + options    RPOP
  6783. + #options    APOP
  6784. + curses -lcurses -ltermcap
  6785. + ranlib  on
  6786. + # Sun specifics
  6787. + #options    TYPESIG=void
  6788. + signal    void
  6789. + options    DBMPWD
  6790. + options    NFS
  6791. + options    SUN40
  6792. + options    ATTVIBUG
  6793. + #options    MPOP
  6794. + #options    ZONEINFO
  6795. + #
  6796. + #cc    /usr/bs/sunc/cc
  6797. + cc    /usr/gnu/bin/gcc -ansi -fpcc-struct-return
  6798. + ldoptions -s
  6799. + ldoptlibs -ldbm
  6800. + sharedlib off
  6801. *** /dev/null    Tue Dec 15 08:01:10 1992
  6802. --- conf/examples/uci.hp-pa    Thu Dec  3 09:37:33 1992
  6803. ***************
  6804. *** 0 ****
  6805. --- 1,64 ----
  6806. + # uci.hp-pa    - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
  6807. + # based on a file from Bill Wohler <wohler@sap-ag.de>
  6808. + # Sat, 31 Oct 92 19:16:29 +0100
  6809. + #
  6810. + #
  6811. + # Installation Paths
  6812. + #
  6813. + bin        /usr/local/mh-6.8
  6814. + etc        /usr/local/lib/mh-6.8
  6815. + popdir        /usr/local/lib/mh-6.8
  6816. + mandir        /usr/man/mh
  6817. + manuals        standard
  6818. + chown        /bin/chown
  6819. + #ln        ln -s
  6820. + #
  6821. + # Compiler/loader
  6822. + #
  6823. + ccoptions    +DA1.0 +DS1.0
  6824. + curses        -lcurses -ltermlib
  6825. + ldoptions    -s
  6826. + #
  6827. + # Message Transport System
  6828. + #
  6829. + mts        mmdf2/smtp
  6830. + #
  6831. + # UCI BBoards Facility
  6832. + #
  6833. + #bboards     nntp
  6834. + bboards     off
  6835. + bbdelivery    off
  6836. + #
  6837. + # Post Office Protocol
  6838. + #
  6839. + pop        on
  6840. + #
  6841. + # General System Dependencies
  6842. + #
  6843. + signal        void
  6844. + sprintf        int
  6845. + options        BIND
  6846. + options        DBMPWD
  6847. + options        FCNTL
  6848. + options        MORE='"/usr/bin/more"'
  6849. + options        RENAME
  6850. + options        SOCKETS
  6851. + options        SYS5
  6852. + options        SYS5DIR
  6853. + options        UNISTD
  6854. + options        VSPRINTF
  6855. + options        _CLASSIC_ANSI_TYPES
  6856. + #
  6857. + # Site Preferences
  6858. + #
  6859. + options        FOLDPROT='"0700"'
  6860. + options        MHE
  6861. + options        MHRC
  6862. + options        MIME
  6863. + options        MSGPROT='"0600"'
  6864. + options        OVERHEAD
  6865. + options        RPOP
  6866. + options        UCI
  6867. + options        WHATNOW
  6868. *** ../mh-6.7.2/conf/examples/uci.sequent    Thu Jan 30 13:05:24 1992
  6869. --- conf/examples/uci.sequent    Mon Dec 14 13:30:09 1992
  6870. ***************
  6871. *** 1,5 ****
  6872. ! # uci.sun - for a Sequent running Dynix 3.0.17
  6873. ! bin    /usr/local/mh-6.7.2
  6874.   bbhome    /usr/bboards
  6875. - etc    /usr/local/lib/mh-6.7.2
  6876.   mail    /usr/spool/mail
  6877. --- 1,11 ----
  6878. ! # uci.sequent    - MH 6.8 - Sequent running Dynix 3.1
  6879. ! #
  6880. ! bin    /usr/bs/mh-6.8/bin
  6881. ! etc    /usr/bs/mh-6.8/lib
  6882. ! #mandir    /usr/man
  6883. ! mandir    /usr/bs/mh-6.8/man
  6884. ! #popdir    /usr/etc
  6885. ! popdir    /usr/bs/mh-6.8/lib
  6886. ! #slibdir    /usr/bs/mh-6.8/lib
  6887.   bbhome    /usr/bboards
  6888.   mail    /usr/spool/mail
  6889. ***************
  6890. *** 6,9 ****
  6891.   mailgroup    off
  6892. ! mandir    /usr/man
  6893. ! manuals    local
  6894.   chown    /etc/chown
  6895. --- 12,14 ----
  6896.   mailgroup    off
  6897. ! manuals    standard
  6898.   chown    /etc/chown
  6899. ***************
  6900. *** 10,12 ****
  6901.   editor    prompter
  6902. ! remove    mv -f
  6903.   mts    mmdf2/smtp
  6904. --- 15,17 ----
  6905.   editor    prompter
  6906. ! remove    rm -f
  6907.   mts    mmdf2/smtp
  6908. ***************
  6909. *** 13,15 ****
  6910.   bboards    nntp
  6911. ! bbdelivery on
  6912.   mf    off
  6913. --- 18,21 ----
  6914.   bboards    nntp
  6915. ! #bbdelivery on
  6916. ! bbdelivery off
  6917.   mf    off
  6918. ***************
  6919. *** 19,21 ****
  6920.   options    BSD43 
  6921. - #options    DBM
  6922.   #options    LOCKF
  6923. --- 25,26 ----
  6924. ***************
  6925. *** 23,33 ****
  6926.   options    MHRC 
  6927. - #options    NFS
  6928. - options    POP2
  6929.   options    RPATHS
  6930. - options    RPOP
  6931. - #options    SUN40 
  6932. - #options    TYPESIG=void
  6933.   options    WHATNOW
  6934.   options UCI
  6935.   #options    ZONEINFO
  6936.   cc    atscc
  6937. --- 28,48 ----
  6938.   options    MHRC 
  6939.   options    RPATHS
  6940.   options    WHATNOW
  6941. + options    MIME
  6942.   options UCI
  6943. + options    POP2
  6944. + options    RPOP
  6945. + #options    APOP
  6946. + curses -lcurses -ltermcap
  6947. + ranlib  on
  6948. + # Sequent specicis
  6949. + #options    TYPESIG=int
  6950. + signal    int
  6951. + #options    DBMPWD
  6952. + #options    NFS
  6953. + #options    SUN40 
  6954. + #options    ATTVIBUG
  6955. + #options    MPOP
  6956.   #options    ZONEINFO
  6957. + #
  6958.   cc    atscc
  6959. ***************
  6960. *** 34,38 ****
  6961.   ldoptions -s
  6962. ! ldoptlibs -ldbm -lseq
  6963. ! curses -lcurses -ltermcap
  6964. ! ranlib  on
  6965.   sharedlib off
  6966. --- 49,51 ----
  6967.   ldoptions -s
  6968. ! ldoptlibs -lseq
  6969.   sharedlib off
  6970. *** ../mh-6.7.2/conf/examples/uci.sun    Tue Jan 28 15:07:56 1992
  6971. --- conf/examples/uci.sun    Mon Dec 14 10:23:32 1992
  6972. ***************
  6973. *** 1,5 ****
  6974. ! # uci.sun - for a Sun3 or Sun4 running Sun OS 4.1
  6975. ! bin    /usr/local/mh-6.7.2
  6976. ! bbhome    /usr/bboards
  6977. ! etc    /usr/local/lib/mh-6.7.2
  6978.   mail    /usr/spool/mail
  6979. --- 1,9 ----
  6980. ! # uci.sun    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  6981. ! #
  6982. ! bin    /usr/bs/mh-6.8/bin
  6983. ! etc    /usr/bs/mh-6.8/lib
  6984. ! popdir    /usr/bs/mh-6.8/lib
  6985. ! mandir    /usr/bs/mh-6.8/man
  6986. ! slibdir    /usr/bs/mh-6.8/lib
  6987. ! bbhome    /usr/bs/mh-6.8/bboards
  6988.   mail    /usr/spool/mail
  6989. ***************
  6990. *** 6,10 ****
  6991.   mailgroup    off
  6992. ! mandir    /usr/man
  6993. ! #manuals    local
  6994. ! manuals        gen
  6995.   chown    /etc/chown
  6996. --- 10,12 ----
  6997.   mailgroup    off
  6998. ! manuals        standard
  6999.   chown    /etc/chown
  7000. ***************
  7001. *** 11,13 ****
  7002.   editor    prompter
  7003. ! remove    mv -f
  7004.   mts    mmdf2/smtp
  7005. --- 13,15 ----
  7006.   editor    prompter
  7007. ! remove    rm -f
  7008.   mts    mmdf2/smtp
  7009. ***************
  7010. *** 20,22 ****
  7011.   options    BSD43 
  7012. - options    DBM
  7013.   #options    LOCKF
  7014. --- 22,23 ----
  7015. ***************
  7016. *** 24,44 ****
  7017.   options    MHRC 
  7018. - options    NFS
  7019. - options    POP2
  7020.   options    RPATHS
  7021.   options    RPOP
  7022.   options    SUN40
  7023. - options    SUN41
  7024. - options    SUNVIBUG
  7025.   options    ATTVIBUG
  7026. ! options    TYPESIG=void
  7027. ! options    WHATNOW
  7028. ! options UCI
  7029.   #options    ZONEINFO
  7030. ! # for Sun4s
  7031.   cc    /usr/bs/sunc/cc
  7032. ! ldoptions -s
  7033.   ldoptlibs -ldbm
  7034. ! curses -lcurses -ltermcap
  7035. ! ranlib  on
  7036. ! sharedlib on
  7037. ! slibdir    /usr/local/lib
  7038. --- 25,49 ----
  7039.   options    MHRC 
  7040.   options    RPATHS
  7041. + options    WHATNOW
  7042. + options    MIME
  7043. + options UCI
  7044. + options    POP2
  7045.   options    RPOP
  7046. + #options    APOP
  7047. + curses -lcurses -ltermcap
  7048. + ranlib  on
  7049. + # Sun specifics
  7050. + #options    TYPESIG=void
  7051. + signal    void
  7052. + options    DBMPWD
  7053. + options    NFS
  7054.   options    SUN40
  7055.   options    ATTVIBUG
  7056. ! #options    MPOP
  7057.   #options    ZONEINFO
  7058. ! #
  7059.   cc    /usr/bs/sunc/cc
  7060. ! #cc    /usr/gnu/bin/gcc
  7061. ! ldoptions -s -L/usr/bs/mh-6.8/lib
  7062.   ldoptlibs -ldbm
  7063. ! sharedlib sun4
  7064. *** ../mh-6.7.2/conf/examples/uci.sun.debug    Tue Feb 12 15:57:14 1991
  7065. --- conf/examples/uci.sun.debug    Thu Dec  3 09:35:05 1992
  7066. ***************
  7067. *** 1,5 ****
  7068. ! # uci.sun - for a Sun3 or Sun4 running Sun OS 4.1
  7069. ! bin    /usr/local
  7070. ! bbhome    /usr/bboards
  7071. ! etc    /usr/local/lib/mh
  7072.   mail    /usr/spool/mail
  7073. --- 1,9 ----
  7074. ! # uci.sun.debug    - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
  7075. ! #
  7076. ! bin    /usr/bs/mh-6.8/bin
  7077. ! etc    /usr/bs/mh-6.8/lib
  7078. ! popdir    /usr/bs/mh-6.8/lib
  7079. ! mandir    /usr/bs/mh-6.8/man
  7080. ! slibdir    /usr/bs/mh-6.8/lib
  7081. ! bbhome    /usr/bs/mh-6.8/bboards
  7082.   mail    /usr/spool/mail
  7083. ***************
  7084. *** 6,9 ****
  7085.   mailgroup    off
  7086. ! mandir    /usr/man
  7087. ! manuals    local
  7088.   chown    /etc/chown
  7089. --- 10,12 ----
  7090.   mailgroup    off
  7091. ! manuals        standard
  7092.   chown    /etc/chown
  7093. ***************
  7094. *** 10,12 ****
  7095.   editor    prompter
  7096. ! remove    mv -f
  7097.   mts    mmdf2/smtp
  7098. --- 13,15 ----
  7099.   editor    prompter
  7100. ! remove    rm -f
  7101.   mts    mmdf2/smtp
  7102. ***************
  7103. *** 19,22 ****
  7104.   options    BSD43 
  7105. ! options    DBM
  7106. ! options    LOCKF
  7107.   options    MHE
  7108. --- 22,24 ----
  7109.   options    BSD43 
  7110. ! #options    LOCKF
  7111.   options    MHE
  7112. ***************
  7113. *** 23,41 ****
  7114.   options    MHRC 
  7115. - options    NFS
  7116. - options    POP2
  7117.   options    RPATHS
  7118. - options    RPOP
  7119. - options    SUN40 
  7120. - options    SUNVIBUG
  7121. - options    TYPESIG=void
  7122.   options    WHATNOW
  7123.   options UCI
  7124.   #options    ZONEINFO
  7125.   ccoptions -g
  7126. - #ldoptions -s
  7127.   ldoptlibs -ldbm
  7128. ! curses -lcurses -ltermcap
  7129. ! ranlib  on
  7130. ! #sharedlib on
  7131. ! sharedlib off
  7132. ! slibdir    /usr/local/lib
  7133. --- 25,51 ----
  7134.   options    MHRC 
  7135.   options    RPATHS
  7136.   options    WHATNOW
  7137. + options    MIME
  7138.   options UCI
  7139. + options    POP2
  7140. + options    RPOP
  7141. + #options    APOP
  7142. + curses -lcurses -ltermcap
  7143. + ranlib  on
  7144. + # Sun specifics
  7145. + #options    TYPESIG=void
  7146. + signal    void
  7147. + options    DBMPWD
  7148. + options    NFS
  7149. + options    SUN40
  7150. + options    ATTVIBUG
  7151. + #options    MPOP
  7152.   #options    ZONEINFO
  7153. + #
  7154. + cc    /usr/bs/sunc/cc
  7155. + #cc    /usr/gnu/bin/gcc
  7156. + #ldoptions -s -L/usr/bs/mh-6.8/lib
  7157. + ldoptions -g
  7158.   ccoptions -g
  7159.   ldoptlibs -ldbm
  7160. ! #sharedlib sun4
  7161. *** ../mh-6.7.2/conf/examples/udel    Fri Apr  6 09:25:06 1990
  7162. --- conf/examples/udel    Thu Dec  3 09:39:41 1992
  7163. ***************
  7164. *** 1 ****
  7165. --- 1,2 ----
  7166. + # udel        - UDel template
  7167.   bin    /usr/uci
  7168. *** /dev/null    Tue Dec 15 08:01:10 1992
  7169. --- conf/examples/ultrix.sap-ag.de    Thu Dec  3 09:35:27 1992
  7170. ***************
  7171. *** 0 ****
  7172. --- 1,24 ----
  7173. + # ultrix.sap-ag.de - MH 6.8 options for ULTRIX (ULTRIX 4.2 on RISC).
  7174. + # Bill Wohler <wohler@sap-ag.de>
  7175. + # Sat, 31 Oct 92 19:14:43 +0100
  7176. + #
  7177. + # General
  7178. + #
  7179. + bin        /usr/local/bin/mh
  7180. + ldoptions    -s
  7181. + mandir        /usr/local/man
  7182. + manuals        standard
  7183. + mts        sendmail/smtp
  7184. + options        BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
  7185. + #
  7186. + # Machine specific options
  7187. + #
  7188. + options        TYPESIG=void BSD42 BSD43
  7189. + curses        -lcurses -ltermlib
  7190. + #
  7191. + #
  7192. + # the compiler complains:
  7193. + # formatsbr.c:
  7194. + # uopt: Warning: fmtscan: this procedure not optimized because it
  7195. + #      exceeds size threshold; to optimize this procedure, use -Olimit option
  7196. + #      with value >=  679.
  7197. *** ../mh-6.7.2/conf/makefiles/MH-Makefile    Sun Apr  8 19:55:57 1990
  7198. --- conf/makefiles/MH-Makefile    Thu Dec  3 08:23:48 1992
  7199. ***************
  7200. *** 4,6 ****
  7201.   #    @(MHWARNING)
  7202. ! # @(#)$Id: MH-Makefile,v 2.5 90/04/08 14:09:51 sources Exp $
  7203.   ##############################################################################
  7204. --- 4,6 ----
  7205.   #    @(MHWARNING)
  7206. ! # @(#)$Id: MH-Makefile,v 2.15 1992/12/03 16:23:40 jromine Exp $
  7207.   ##############################################################################
  7208. ***************
  7209. *** 20,23 ****
  7210.   #
  7211. ! #    install:    install system and clean up afterwards
  7212.   #
  7213.   #    inst-lib:  install shared libraries
  7214. --- 20,25 ----
  7215.   #
  7216. ! #    install:    install system
  7217.   #
  7218. + #    inst-all:    install system
  7219. + #
  7220.   #    inst-lib:  install shared libraries
  7221. ***************
  7222. *** 24,26 ****
  7223.   #
  7224. ! #    inst-all:    install system
  7225.   #
  7226. --- 26,28 ----
  7227.   #
  7228. ! #    mkdirs:    make MH target directories
  7229.   #
  7230. ***************
  7231. *** 61,62 ****
  7232. --- 63,66 ----
  7233.   INSTALL    =    zotnet support uip doc
  7234. + BINDIR    =    $(DESTDIR)@(MHBINPATH)
  7235. + ETCDIR    =    $(DESTDIR)@(MHETCPATH)
  7236.   SLIB    =    sbr
  7237. ***************
  7238. *** 63,67 ****
  7239.   
  7240. ! install:    inst-all clean
  7241.   
  7242. ! inst-all:    inst-lib
  7243.           for d in $(INSTALL); do (cd $$d; $(MAKE) inst-all); done
  7244. --- 67,71 ----
  7245.   
  7246. ! install:    inst-all
  7247.   
  7248. ! inst-all:    mkdirs inst-lib
  7249.           for d in $(INSTALL); do (cd $$d; $(MAKE) inst-all); done
  7250. ***************
  7251. *** 70,71 ****
  7252. --- 74,81 ----
  7253.   
  7254. + mkdirs:        $(BINDIR) $(ETCDIR)
  7255. + $(BINDIR) $(ETCDIR):
  7256. +         mkdir $@
  7257. +         chmod 0755 $@
  7258.   tar:;        @for d in $(INSTALL); \
  7259. ***************
  7260. *** 82,84 ****
  7261.   
  7262. ! distribution:;    rm -f _* :*
  7263.           @if test -f tma/mh/files; \
  7264. --- 92,95 ----
  7265.   
  7266. ! distribution:    READ-ME CHANGES
  7267. !         rm -f _* :*
  7268.           @if test -f tma/mh/files; \
  7269. ***************
  7270. *** 88,89 ****
  7271. --- 99,108 ----
  7272.            fi
  7273. +         -rm -f support/pop/mmdfII/pop/lock.c
  7274. +         -rm -f support/bboards/mmdfII/bboards/lock.c
  7275. +         -rm -f zotnet/tws/tws.h
  7276. +         -rm -f uip/pshsbr.c
  7277. +         cd support/pop/mmdfII/pop ; @(LN) ../../../../zotnet/mts/lock.c .
  7278. +         cd support/bboards/mmdfII/bboards ; @(LN) ../../../../zotnet/mts/lock.c .
  7279. +         cd zotnet/tws ; @(LN) ../tws.h .
  7280. +         cd uip ; @(LN) popsbr.c pshsbr.c
  7281.           for d in $(DISTRIBUTION); \
  7282. ***************
  7283. *** 91,96 ****
  7284.   
  7285. ! unconfig:;    rm -f _* :* core
  7286.           for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unconfig); done
  7287. !         echo > tmp \
  7288. !     'all:; @echo "You must configure MH first -- see READ-ME for details"'
  7289.           mv tmp Makefile
  7290. --- 110,126 ----
  7291.   
  7292. ! READ-ME:    conf/mh-gen.8
  7293. !         nroff -man conf/mh-gen.8 > read-me.tmp
  7294. !         mv read-me.tmp $@
  7295. ! CHANGES:    papers/changes/mh-changes.ms
  7296. !         nroff -ms papers/changes/mh-changes.ms > changes.tmp
  7297. !         mv changes.tmp $@
  7298. ! unconfig:;    rm -f _* :* core READ-ME
  7299. !         -rm -f support/pop/mmdfII/pop/lock.c
  7300. !         -rm -f support/bboards/mmdfII/bboards/lock.c
  7301. !         -rm -f zotnet/tws/tws.h
  7302. !         -rm -f uip/pshsbr.c
  7303.           for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unconfig); done
  7304. !         cp conf/makefiles/MH-Unconfig tmp
  7305.           mv tmp Makefile
  7306. *** /dev/null    Tue Dec 15 08:01:10 1992
  7307. --- conf/makefiles/MH-Unconfig    Thu Dec  3 08:23:48 1992
  7308. ***************
  7309. *** 0 ****
  7310. --- 1,20 ----
  7311. + all clean:;    @echo "You must configure MH first -- see READ-ME for details"
  7312. + distribution unconfig:    links READ-ME CHANGES
  7313. + READ-ME:    conf/mh-gen.8
  7314. +         nroff -man conf/mh-gen.8 > read-me.tmp
  7315. +         mv read-me.tmp $@
  7316. + CHANGES:    papers/changes/mh-changes.ms
  7317. +         nroff -ms papers/changes/mh-changes.ms > changes.tmp
  7318. +         mv changes.tmp $@
  7319. + links:;        -rm -f support/pop/mmdfII/pop/lock.c
  7320. +         -rm -f support/bboards/mmdfII/bboards/lock.c
  7321. +         -rm -f zotnet/tws/tws.h
  7322. +         -rm -f uip/pshsbr.c
  7323. +         ln zotnet/mts/lock.c support/pop/mmdfII/pop/lock.c
  7324. +         ln zotnet/mts/lock.c support/bboards/mmdfII/bboards/lock.c
  7325. +         ln zotnet/tws.h zotnet/tws/tws.h
  7326. +         ln uip/popsbr.c uip/pshsbr.c
  7327. *** ../mh-6.7.2/conf/makefiles/config    Sun Apr  8 22:00:30 1990
  7328. --- conf/makefiles/config    Wed Feb  5 13:53:13 1992
  7329. ***************
  7330. *** 4,6 ****
  7331.   #    @(MHWARNING)
  7332. ! # @(#)$Id: config,v 2.7 90/04/08 22:00:29 sources Exp $
  7333.   ##############################################################################
  7334. --- 4,6 ----
  7335.   #    @(MHWARNING)
  7336. ! # @(#)$Id: config,v 2.8 1992/02/05 21:52:46 jromine Exp $
  7337.   ##############################################################################
  7338. ***************
  7339. *** 36,38 ****
  7340.   version version.c:    true
  7341. !         @/bin/sh version.sh @(MHRELEASE)
  7342.   
  7343. --- 36,38 ----
  7344.   version version.c:    true
  7345. !         @/bin/sh version.sh @(MHHOSTVER) @(MHRELEASE)
  7346.   
  7347. *** ../mh-6.7.2/conf/makefiles/dist    Sun Apr  8 20:01:29 1990
  7348. --- conf/makefiles/dist    Wed Dec  2 14:21:48 1992
  7349. ***************
  7350. *** 4,6 ****
  7351.   #    @(MHWARNING)
  7352. ! # @(#)$Id: dist,v 2.6 90/04/08 20:01:28 sources Exp $
  7353.   ##############################################################################
  7354. --- 4,6 ----
  7355.   #    @(MHWARNING)
  7356. ! # @(#)$Id: dist,v 2.7 1992/12/02 22:21:43 jromine Exp $
  7357.   ##############################################################################
  7358. ***************
  7359. *** 27,29 ****
  7360.   TARGETS    =    ../READ-ME \
  7361. !         mh-gen.cat MH.cat ADMIN.cat mh6.7.cat \
  7362.           bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
  7363. --- 27,29 ----
  7364.   TARGETS    =    ../READ-ME \
  7365. !         mh-gen.cat MH.cat ADMIN.cat mh-changes.cat \
  7366.           bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
  7367. ***************
  7368. *** 35,37 ****
  7369.   
  7370. ! doc:        MH.doc ADMIN.doc mh6.7.doc
  7371.   
  7372. --- 35,37 ----
  7373.   
  7374. ! doc:        MH.doc ADMIN.doc mh-changes.doc
  7375.   
  7376. ***************
  7377. *** 38,40 ****
  7378.   
  7379. ! IMPRESS    =    mh-gen.imp MH.imp ADMIN.imp mh6.7.imp \
  7380.           bboards.imp beginners.imp \
  7381. --- 38,40 ----
  7382.   
  7383. ! IMPRESS    =    mh-gen.imp MH.imp ADMIN.imp mh-changes.imp \
  7384.           bboards.imp beginners.imp \
  7385. ***************
  7386. *** 50,52 ****
  7387.       lpr -t -J ADMIN ADMIN.cat
  7388. !     lpr -t -J MH.6.7 mh6.7.cat
  7389.       lpr -d -J BBoards bboards.dvi
  7390. --- 50,52 ----
  7391.       lpr -t -J ADMIN ADMIN.cat
  7392. !     lpr -t -J MH-CHANGES mh-changes.cat
  7393.       lpr -d -J BBoards bboards.dvi
  7394. ***************
  7395. *** 83,89 ****
  7396.   
  7397. ! mh6.7.cat \
  7398. ! mh6.7.doc \
  7399. ! mh6.7.imp:    true
  7400. !         cd ../papers/mh6.7; make $@
  7401. !         cp ../papers/mh6.7/$@ $@
  7402.   
  7403. --- 83,89 ----
  7404.   
  7405. ! mh-changes.cat \
  7406. ! mh-changes.doc \
  7407. ! mh-changes.imp:    true
  7408. !         cd ../papers/changes; make $@
  7409. !         cp ../papers/changes/$@ $@
  7410.   
  7411. *** ../mh-6.7.2/conf/makefiles/doc    Wed Jan 29 15:33:36 1992
  7412. --- conf/makefiles/doc    Thu Oct 29 22:47:50 1992
  7413. ***************
  7414. *** 4,6 ****
  7415.   #    @(MHWARNING)
  7416. ! # @(#)$Id: doc,v 2.13 1992/01/29 23:33:31 jromine Exp $
  7417.   ##############################################################################
  7418. --- 4,6 ----
  7419.   #    @(MHWARNING)
  7420. ! # @(#)$Id: doc,v 2.24 1992/10/28 17:01:04 jromine Exp $
  7421.   ##############################################################################
  7422. ***************
  7423. *** 9,11 ****
  7424.   ETCDIR    =    $(DESTDIR)@(MHETCPATH)
  7425. ! MANDIR    =    @(MHMANDIR)
  7426.   DIR1    =    @(MHMANDIR1)
  7427. --- 9,11 ----
  7428.   ETCDIR    =    $(DESTDIR)@(MHETCPATH)
  7429. ! MANDIR    =    $(DESTDIR)@(MHMANDIR)
  7430.   DIR1    =    @(MHMANDIR1)
  7431. ***************
  7432. *** 34,37 ****
  7433.           mark.$(EXT1) mh-chart.$(EXT1) mh.$(EXT1) mhl.$(EXT1) \
  7434. !         mhook.$(EXT1) mhmail.$(EXT1) mhpath.$(EXT1) msgchk.$(EXT1) \
  7435.           msh.$(EXT1) next.$(EXT1) packf.$(EXT1) pick.$(EXT1) \
  7436.           prev.$(EXT1) prompter.$(EXT1) rcvstore.$(EXT1) refile.$(EXT1) \
  7437. --- 34,44 ----
  7438.           mark.$(EXT1) mh-chart.$(EXT1) mh.$(EXT1) mhl.$(EXT1) \
  7439. !         mhook.$(EXT1) mhmail.$(EXT1) \
  7440. ! @BEGIN: MIME
  7441. !         mhn.$(EXT1) \
  7442. ! @END: MIME
  7443. !         mhparam.$(EXT1) mhpath.$(EXT1) msgchk.$(EXT1) \
  7444.           msh.$(EXT1) next.$(EXT1) packf.$(EXT1) pick.$(EXT1) \
  7445. + @BEGIN: MPOP
  7446. +         popi.$(EXT1) \
  7447. + @END: MPOP
  7448.           prev.$(EXT1) prompter.$(EXT1) rcvstore.$(EXT1) refile.$(EXT1) \
  7449. ***************
  7450. *** 38,40 ****
  7451.           repl.$(EXT1) rmf.$(EXT1) rmm.$(EXT1) scan.$(EXT1) \
  7452. !         send.$(EXT1) show.$(EXT1) sortm.$(EXT1) vmh.$(EXT1) \
  7453.           whatnow.$(EXT1) whom.$(EXT1) $(OPTIONS1)  $(OPTIONS2)
  7454. --- 45,48 ----
  7455.           repl.$(EXT1) rmf.$(EXT1) rmm.$(EXT1) scan.$(EXT1) \
  7456. !         send.$(EXT1) show.$(EXT1) slocal.$(EXT1) \
  7457. !         sortm.$(EXT1) vmh.$(EXT1) \
  7458.           whatnow.$(EXT1) whom.$(EXT1) $(OPTIONS1)  $(OPTIONS2)
  7459. ***************
  7460. *** 41,44 ****
  7461.   man1    =    ali anno burst comp dist folder forw inc mark mh-chart mh mhl \
  7462. !         mhook mhmail mhpath msgchk msh next packf pick prev prompter \
  7463. !         rcvstore refile repl rmf rmm scan send show sortm vmh whatnow \
  7464.           whom $(options1) $(options2)
  7465. --- 49,61 ----
  7466.   man1    =    ali anno burst comp dist folder forw inc mark mh-chart mh mhl \
  7467. !         mhook mhmail \
  7468. ! @BEGIN: MIME
  7469. !         mhn \
  7470. ! @END: MIME
  7471. !         mhparam mhpath msgchk msh next packf pick \
  7472. ! @BEGIN: MPOP
  7473. !         popi \
  7474. ! @END: MPOP
  7475. !         prev prompter \
  7476. !         rcvstore refile repl rmf rmm scan send show slocal \
  7477. !         sortm vmh whatnow \
  7478.           whom $(options1) $(options2)
  7479. ***************
  7480. *** 46,51 ****
  7481.           inst-forw inst-inc inst-mark inst-mh-chart inst-mh inst-mhl \
  7482. !         inst-mhook inst-mhmail inst-mhpath inst-msgchk inst-msh \
  7483. !         inst-next inst-packf inst-pick inst-prev inst-prompter \
  7484.           inst-rcvstore inst-refile inst-repl inst-rmf inst-rmm \
  7485. !         inst-scan inst-send inst-show inst-sortm inst-vmh \
  7486.           inst-whatnow inst-whom $(inst-options1) $(inst-options2)
  7487. --- 63,76 ----
  7488.           inst-forw inst-inc inst-mark inst-mh-chart inst-mh inst-mhl \
  7489. !         inst-mhook inst-mhmail \
  7490. ! @BEGIN: MIME
  7491. !         inst-mhn \
  7492. ! @END: MIME
  7493. !         inst-mhparam inst-mhpath inst-msgchk inst-msh \
  7494. !         inst-next inst-packf inst-pick \
  7495. ! @BEGIN: MPOP
  7496. !         inst-popi \
  7497. ! @END: MPOP
  7498. !         inst-prev inst-prompter \
  7499.           inst-rcvstore inst-refile inst-repl inst-rmf inst-rmm \
  7500. !         inst-scan inst-send inst-show inst-slocal inst-sortm inst-vmh \
  7501.           inst-whatnow inst-whom $(inst-options1) $(inst-options2)
  7502. ***************
  7503. *** 53,58 ****
  7504.           forw.man inc.man mark.man mh-chart.man mh.man mhl.man \
  7505. !         mhook.man mhmail.man mhpath.man msgchk.man msh.man next.man \
  7506. !         packf.man pick.man prev.man prompter.man rcvstore.man \
  7507.           refile.man repl.man rmf.man rmm.man scan.man send.man \
  7508. !         show.man sortm.man vmh.man whatnow.man whom.man $(Toptions1) \
  7509.           $(Toptions2)
  7510. --- 78,91 ----
  7511.           forw.man inc.man mark.man mh-chart.man mh.man mhl.man \
  7512. !         mhook.man mhmail.man \
  7513. ! @BEGIN: MIME
  7514. !         mhn.man \
  7515. ! @END: MIME
  7516. !         mhparam.man mhpath.man msgchk.man msh.man next.man packf.man \
  7517. ! @BEGIN: MPOP
  7518. !         popi.man \
  7519. ! @END: MPOP
  7520. !         pick.man prev.man prompter.man rcvstore.man \
  7521.           refile.man repl.man rmf.man rmm.man scan.man send.man \
  7522. !         show.man slocal.man \
  7523. !         sortm.man vmh.man whatnow.man whom.man $(Toptions1) \
  7524.           $(Toptions2)
  7525. ***************
  7526. *** 60,67 ****
  7527.   MAN5    =    mh-alias.$(EXT5) mh-format.$(EXT5) mh-mail.$(EXT5) \
  7528. !         mh-profile.$(EXT5) mh-sequence.$(EXT5)
  7529. ! man5    =    mh-alias mh-format mh-mail mh-profile mh-sequence
  7530.   inst-man5=    inst-mh-alias inst-mh-format inst-mh-mail inst-mh-profile \
  7531. !         inst-mh-sequence
  7532.   Tman5    =    mh-alias.man mh-format.man mh-mail.man mh-profile.man \
  7533. !         mh-sequence.man
  7534.   
  7535. --- 93,100 ----
  7536.   MAN5    =    mh-alias.$(EXT5) mh-format.$(EXT5) mh-mail.$(EXT5) \
  7537. !         mh-profile.$(EXT5) mh-sequence.$(EXT5) mh-tailor.$(EXT5)
  7538. ! man5    =    mh-alias mh-format mh-mail mh-profile mh-sequence mh-tailor 
  7539.   inst-man5=    inst-mh-alias inst-mh-format inst-mh-mail inst-mh-profile \
  7540. !         inst-mh-sequence inst-mh-tailor 
  7541.   Tman5    =    mh-alias.man mh-format.man mh-mail.man mh-profile.man \
  7542. !         mh-sequence.man mh-tailor.man 
  7543.   
  7544. ***************
  7545. *** 68,75 ****
  7546.   MAN8    =    ap.$(EXT8) conflict.$(EXT8) dp.$(EXT8) install-mh.$(EXT8) \
  7547. !         post.$(EXT8) mh-tailor.$(EXT8) fmtdump.$(EXT8)
  7548. ! man8    =    ap conflict dp install-mh post mh-tailor fmtdump
  7549. ! inst-man8=    inst-ap inst-conflict inst-dp inst-install-mh inst-post \
  7550. !         inst-mh-tailor inst-fmtdump
  7551. ! Tman8    =    ap.man conflict.man dp.man install-mh.man post.man \
  7552. !         mh-tailor.man fmtdump.man
  7553.   
  7554. --- 101,123 ----
  7555.   MAN8    =    ap.$(EXT8) conflict.$(EXT8) dp.$(EXT8) install-mh.$(EXT8) \
  7556. ! @BEGIN: APOP
  7557. !         popauth.$(EXT8) \
  7558. ! @END: APOP
  7559. !         post.$(EXT8) fmtdump.$(EXT8) 
  7560. ! man8    =    ap conflict dp install-mh \
  7561. ! @BEGIN: APOP
  7562. !         popauth \
  7563. ! @END: APOP
  7564. !         post fmtdump 
  7565. ! inst-man8=    inst-ap inst-conflict inst-dp inst-install-mh \
  7566. ! @BEGIN: APOP
  7567. !         inst-popauth \
  7568. ! @END: APOP
  7569. !         inst-post \
  7570. !         inst-fmtdump 
  7571. ! Tman8    =    ap.man conflict.man dp.man install-mh.man \
  7572. ! @BEGIN: APOP
  7573. !         popauth.man \
  7574. ! @END: APOP
  7575. !         post.man \
  7576. !         fmtdump.man 
  7577.   
  7578. ***************
  7579. *** 117,129 ****
  7580.   
  7581. ! i-all:        manual guide
  7582.   
  7583. ! i-print:    manual guide true
  7584. !         lpr -t -J MH MH.cat
  7585. !         lpr -t -J MH ADMIN.cat
  7586.   
  7587. - manual:        MH.cat
  7588. - guide:        ADMIN.cat
  7589.   true:;
  7590. --- 165,170 ----
  7591.   
  7592. ! manual:        MH.doc
  7593.   
  7594. ! guide:        ADMIN.doc
  7595.   
  7596.   true:;
  7597. ***************
  7598. *** 361,365 ****
  7599.   
  7600. ! inst-mh-tailor:    $(MANDIR)/$(DIR8)/mh-tailor.$(EXT8)
  7601.   
  7602. ! $(MANDIR)/$(DIR8)/mh-tailor.$(EXT8):    mh-tailor.man
  7603.           -$(REMOVE) $@ zmh-tailor.man
  7604. --- 402,406 ----
  7605.   
  7606. ! inst-mh-tailor:    $(MANDIR)/$(DIR5)/mh-tailor.$(EXT5)
  7607.   
  7608. ! $(MANDIR)/$(DIR5)/mh-tailor.$(EXT5):    mh-tailor.man
  7609.           -$(REMOVE) $@ zmh-tailor.man
  7610. ***************
  7611. *** 424,425 ****
  7612. --- 465,484 ----
  7613.   
  7614. + inst-mhn:    $(MANDIR)/$(DIR1)/mhn.$(EXT1)
  7615. + $(MANDIR)/$(DIR1)/mhn.$(EXT1):    mhn.man
  7616. +         -$(REMOVE) $@ zmhn.man
  7617. +         cp mhn.man $@
  7618. +         -@chmod $(MANPROT) $@
  7619. +         -@ls -l $@
  7620. +         -@echo ""
  7621. + inst-mhparam:    $(MANDIR)/$(DIR1)/mhparam.$(EXT1)
  7622. + $(MANDIR)/$(DIR1)/mhparam.$(EXT1):    mhparam.man
  7623. +         -$(REMOVE) $@ zmhparam.man
  7624. +         cp mhparam.man $@
  7625. +         -@chmod $(MANPROT) $@
  7626. +         -@ls -l $@
  7627. +         -@echo ""
  7628.   inst-mhpath:    $(MANDIR)/$(DIR1)/mhpath.$(EXT1)
  7629. ***************
  7630. *** 469,470 ****
  7631. --- 528,547 ----
  7632.   
  7633. + inst-popauth:    $(MANDIR)/$(DIR8)/popauth.$(EXT8)
  7634. + $(MANDIR)/$(DIR8)/popauth.$(EXT8):    popauth.man
  7635. +         -$(REMOVE) $@ zpopauth.man
  7636. +         cp popauth.man $@
  7637. +         -@chmod $(MANPROT) $@
  7638. +         -@ls -l $@
  7639. +         -@echo ""
  7640. + inst-popi:    $(MANDIR)/$(DIR1)/popi.$(EXT1)
  7641. + $(MANDIR)/$(DIR1)/popi.$(EXT1):    popi.man
  7642. +         -$(REMOVE) $@ zpopi.man
  7643. +         cp popi.man $@
  7644. +         -@chmod $(MANPROT) $@
  7645. +         -@ls -l $@
  7646. +         -@echo ""
  7647.   inst-pick:    $(MANDIR)/$(DIR1)/pick.$(EXT1)
  7648. ***************
  7649. *** 577,578 ****
  7650. --- 654,664 ----
  7651.   
  7652. + inst-slocal:    $(MANDIR)/$(DIR1)/slocal.$(EXT1)
  7653. + $(MANDIR)/$(DIR1)/slocal.$(EXT1):    slocal.man
  7654. +         -$(REMOVE) $@ zslocal.man
  7655. +         cp slocal.man $@
  7656. +         -@chmod $(MANPROT) $@
  7657. +         -@ls -l $@
  7658. +         -@echo ""
  7659.   inst-sortm:    $(MANDIR)/$(DIR1)/sortm.$(EXT1)
  7660. ***************
  7661. *** 658,660 ****
  7662. --- 744,748 ----
  7663.   mhmail:        mhmail.man
  7664. + mhparam:    mhparam.man
  7665.   mhpath:        mhpath.man
  7666. + mhn:        mhn.man
  7667.   msgchk:        msgchk.man
  7668. ***************
  7669. *** 664,665 ****
  7670. --- 752,755 ----
  7671.   pick:        pick.man
  7672. + popauth:    popauth.man
  7673. + popi:        popi.man
  7674.   post:        post.man
  7675. ***************
  7676. *** 675,676 ****
  7677. --- 765,767 ----
  7678.   show:        show.man
  7679. + slocal:        slocal.man
  7680.   sortm:        sortm.man
  7681. ***************
  7682. *** 683,690 ****
  7683.           dist.me folder.me forw.me inc.me mark.me mh-chart.me mh.me \
  7684. !         mhl.me mhmail.me mhook.me mhpath.me msgchk.me msh.me next.me \
  7685. !         packf.me pick.me prev.me prompter.me rcvstore.me refile.me \
  7686. !         repl.me rmf.me rmm.me scan.me send.me show.me sortm.me vmh.me \
  7687. !         whatnow.me whom.me mh-alias.me mh-format.me mh-mail.me \
  7688. !         mh-profile.me mh-sequence.me \
  7689. !         ap.me conflict.me dp.me install-mh.me fmtdump.me post.me \
  7690.   @BEGIN: TMA
  7691. --- 774,791 ----
  7692.           dist.me folder.me forw.me inc.me mark.me mh-chart.me mh.me \
  7693. !         mhl.me mhmail.me \
  7694. ! @BEGIN: MIME
  7695. !         mhn.me \
  7696. ! @END: MIME
  7697. !         mhook.me mhparam.me mhpath.me msgchk.me msh.me \
  7698. !         next.me packf.me pick.me \
  7699. ! @BEGIN: MPOP
  7700. !         popi.me \
  7701. ! @END: MPOP
  7702. !         prev.me prompter.me \
  7703. !         rcvstore.me refile.me repl.me rmf.me rmm.me scan.me send.me \
  7704. !         show.me slocal.me \
  7705. !         sortm.me vmh.me whatnow.me whom.me mh-alias.me \
  7706. !         mh-format.me mh-mail.me mh-profile.me mh-sequence.me \
  7707. !         ap.me conflict.me dp.me install-mh.me fmtdump.me \
  7708. !         post.me \
  7709.   @BEGIN: TMA
  7710. ***************
  7711. *** 697,699 ****
  7712.           bboards5.me bbaka.me bbexp.me bboards8.me bbtar.me \
  7713. !         pop5.me pop8.me popaka.me popd.me popwrd.me \
  7714.           mf.me rmail.me \
  7715. --- 798,804 ----
  7716.           bboards5.me bbaka.me bbexp.me bboards8.me bbtar.me \
  7717. !         pop5.me pop8.me popaka.me \
  7718. ! @BEGIN: APOP
  7719. !         popauth.me \
  7720. ! @END: APOP
  7721. !         popd.me popwrd.me \
  7722.           mf.me rmail.me \
  7723. *** ../mh-6.7.2/conf/makefiles/mts/mh    Thu Apr  5 16:05:10 1990
  7724. --- conf/makefiles/mts/mh    Fri Nov 20 09:14:18 1992
  7725. ***************
  7726. *** 4,6 ****
  7727.   #    @(MHWARNING)
  7728. ! # @(#)$Id: mh,v 1.6 90/04/05 15:15:55 sources Exp $
  7729.   ##############################################################################
  7730. --- 4,6 ----
  7731.   #    @(MHWARNING)
  7732. ! # @(#)$Id: mh,v 1.10 1992/11/20 17:14:07 jromine Exp $
  7733.   ##############################################################################
  7734. ***************
  7735. *** 20,21 ****
  7736. --- 20,23 ----
  7737.   LLIBS    =    
  7738. + CP    =    @(CP)
  7739. + LN    =    @(LN)
  7740.   
  7741. ***************
  7742. *** 59,63 ****
  7743.           -rm -f ../libmts.a
  7744. !         ln $@ ../libmts.a
  7745.           -rm -f ../llib-lmts
  7746. !         -ln llib-lmhmts ../llib-lmts
  7747.           -@ls -l $@
  7748. --- 61,65 ----
  7749.           -rm -f ../libmts.a
  7750. !         -cd ..; $(LN) mh/$@ libmts.a
  7751.           -rm -f ../llib-lmts
  7752. !         -cd .. ; $(LN) mh/llib-lmhmts llib-lmts
  7753.           -@ls -l $@
  7754. *** ../mh-6.7.2/conf/makefiles/mts/mmdf    Thu Apr  5 16:05:11 1990
  7755. --- conf/makefiles/mts/mmdf    Fri Nov 20 09:14:17 1992
  7756. ***************
  7757. *** 4,6 ****
  7758.   #    @(MHWARNING)
  7759. ! # @(#)$Id: mmdf,v 1.6 90/04/05 15:16:01 sources Exp $
  7760.   ##############################################################################
  7761. --- 4,6 ----
  7762.   #    @(MHWARNING)
  7763. ! # @(#)$Id: mmdf,v 1.10 1992/11/20 17:14:07 jromine Exp $
  7764.   ##############################################################################
  7765. ***************
  7766. *** 20,21 ****
  7767. --- 20,23 ----
  7768.   LLIBS    =
  7769. + CP    =    @(CP)
  7770. + LN    =    @(LN)
  7771.   
  7772. ***************
  7773. *** 68,72 ****
  7774.           -rm -f ../libmts.a
  7775. !         ln $@ ../libmts.a
  7776.           -rm -f ../llib-lmts
  7777. !         -ln llib-lmmdf ../llib-lmts
  7778.           -@ls -l $@
  7779. --- 70,74 ----
  7780.           -rm -f ../libmts.a
  7781. !         -cd ..; $(LN) mmdf/$@ libmts.a
  7782.           -rm -f ../llib-lmts
  7783. !         -cd .. ; $(LN) mmdf/llib-lmmdf llib-lmts
  7784.           -@ls -l $@
  7785. ***************
  7786. *** 90,94 ****
  7787.           -rm -f ../libmts.a
  7788. !         ln $@ ../libmts.a
  7789.           -rm -f ../llib-lmts
  7790. !         -ln llib-lmmdf ../llib-lmts
  7791.           -@ls -l $@
  7792. --- 92,96 ----
  7793.           -rm -f ../libmts.a
  7794. !         -cd ..; $(LN) mmdf/$@ libmts.a
  7795.           -rm -f ../llib-lmts
  7796. !         -cd ..; $(LN) mmdf/llib-lmmdf llib-lmts
  7797.           -@ls -l $@
  7798. *** ../mh-6.7.2/conf/makefiles/mts/sendmail    Thu Apr  5 16:05:10 1990
  7799. --- conf/makefiles/mts/sendmail    Fri Nov 20 09:14:16 1992
  7800. ***************
  7801. *** 4,6 ****
  7802.   #    @(MHWARNING)
  7803. ! # @(#)$Id: sendmail,v 1.6 90/04/05 15:15:48 sources Exp $
  7804.   ##############################################################################
  7805. --- 4,6 ----
  7806.   #    @(MHWARNING)
  7807. ! # @(#)$Id: sendmail,v 1.10 1992/11/20 17:14:07 jromine Exp $
  7808.   ##############################################################################
  7809. ***************
  7810. *** 18,19 ****
  7811. --- 18,21 ----
  7812.   LFLAGS    =    -bhu $(OPTIONS)
  7813. + CP    =    @(CP)
  7814. + LN    =    @(LN)
  7815.   
  7816. ***************
  7817. *** 58,62 ****
  7818.           -rm -f ../libmts.a
  7819. !         ln $@ ../libmts.a
  7820.           -rm -f ../llib-lmts
  7821. !         -ln llib-lsendmail ../llib-lmts
  7822.           -@ls -l $@
  7823. --- 60,64 ----
  7824.           -rm -f ../libmts.a
  7825. !         -cd ..; $(LN) sendmail/$@ libmts.a
  7826.           -rm -f ../llib-lmts
  7827. !         -cd .. ; $(LN) sendmail/llib-lsendmail llib-lmts
  7828.           -@ls -l $@
  7829. *** ../mh-6.7.2/conf/makefiles/papers    Thu Apr  5 16:05:20 1990
  7830. --- conf/makefiles/papers    Wed Dec  2 13:57:38 1992
  7831. ***************
  7832. *** 4,6 ****
  7833.   #    @(MHWARNING)
  7834. ! # @(#)$Id: papers,v 2.5 90/04/05 15:18:04 sources Exp $
  7835.   ##############################################################################
  7836. --- 4,6 ----
  7837.   #    @(MHWARNING)
  7838. ! # @(#)$Id: papers,v 2.6 1992/12/02 21:57:34 jromine Exp $
  7839.   ##############################################################################
  7840. ***************
  7841. *** 10,12 ****
  7842.   
  7843. ! DIRS    =    bboards beginners mh4 mh4mm mh5 mh6.5 mh6.7 \
  7844.           multifarious mznet realwork trusted tutorial
  7845. --- 10,12 ----
  7846.   
  7847. ! DIRS    =    bboards beginners changes mh4 mh4mm mh5 mh6.5 \
  7848.           multifarious mznet realwork trusted tutorial
  7849. *** ../mh-6.7.2/conf/makefiles/sbr    Thu Jan 30 08:36:20 1992
  7850. --- conf/makefiles/sbr    Wed Nov 18 08:52:40 1992
  7851. ***************
  7852. *** 4,6 ****
  7853.   #    @(MHWARNING)
  7854. ! # @(#)$Id: sbr,v 2.12 1992/01/30 16:36:16 jromine Exp $
  7855.   ##############################################################################
  7856. --- 4,6 ----
  7857.   #    @(MHWARNING)
  7858. ! # @(#)$Id: sbr,v 2.19 1992/11/12 22:47:24 jromine Exp $
  7859.   ##############################################################################
  7860. ***************
  7861. *** 25,27 ****
  7862.   @BEGIN: SHAREDLIB
  7863. ! LIBS     =    shared libmh.a libmh.so libmh.sa
  7864.   SLIBVER    =    @(SLIBVER)
  7865. --- 25,30 ----
  7866.   @BEGIN: SHAREDLIB
  7867. ! @BEGIN: SUN4SHLIB
  7868. ! LIBSA    =    libmh.sa
  7869. ! @END: SUN4SHLIB
  7870. ! LIBS     =    shared libmh.a libmh.so $(LIBSA)
  7871.   SLIBVER    =    @(SLIBVER)
  7872. ***************
  7873. *** 28,29 ****
  7874. --- 31,33 ----
  7875.   SLIBDIR =    @(SLIBDIR)
  7876. + SLFLAGS=    @(SLFLAGS)
  7877.   @END: SHAREDLIB
  7878. ***************
  7879. *** 42,44 ****
  7880.           m_setseq.c m_setvis.c m_sync.c m_tmpfil.c m_update.c \
  7881. !         m_whatnow.c makedir.c path.c peekc.c pidwait.c pidstatus.c \
  7882.           printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
  7883. --- 46,48 ----
  7884.           m_setseq.c m_setvis.c m_sync.c m_tmpfil.c m_update.c \
  7885. !         makedir.c path.c peekc.c pidwait.c pidstatus.c \
  7886.           printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
  7887. ***************
  7888. *** 58,60 ****
  7889.           m_setseq.o m_setvis.o m_sync.o m_tmpfil.o m_update.o \
  7890. !         m_whatnow.o makedir.o path.o peekc.o pidwait.o pidstatus.o \
  7891.           printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
  7892. --- 62,64 ----
  7893.           m_setseq.o m_setvis.o m_sync.o m_tmpfil.o m_update.o \
  7894. !         makedir.o path.o peekc.o pidwait.o pidstatus.o \
  7895.           printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
  7896. ***************
  7897. *** 75,77 ****
  7898.           -rm -f $@ shared/$@
  7899. !         $(CC) $(CFLAGS) -c -pic $*.c
  7900.           mv $@ shared/$@
  7901. --- 79,81 ----
  7902.           -rm -f $@ shared/$@
  7903. !         $(CC) $(CFLAGS) -c $(SLFLAGS) $*.c
  7904.           mv $@ shared/$@
  7905. ***************
  7906. *** 109,111 ****
  7907. --- 113,120 ----
  7908.           -mv -f $@ z$@
  7909. + @BEGIN: SUN4SHLIB
  7910.           (cd shared; ld -o ../$@ -assert pure-text $(OFILES))
  7911. + @END: SUN4SHLIB
  7912. + @BEGIN: SYS5SHLIB
  7913. +         (cd shared; ld -G -o ../$@ -h $@.$(SLIBVER) $(OFILES))
  7914. + @END: SYS5SHLIB
  7915.           -@rm -f $@.$(SLIBVER)
  7916. ***************
  7917. *** 115,116 ****
  7918. --- 124,126 ----
  7919.   
  7920. + @BEGIN: SUN4SHLIB
  7921.   libmh.sa:    $(ODEFS)
  7922. ***************
  7923. *** 127,128 ****
  7924. --- 137,139 ----
  7925.           -@echo "MH data interface description built normally"
  7926. + @END: SUN4SHLIB
  7927.   
  7928. ***************
  7929. *** 136,138 ****
  7930.   @BEGIN: SHAREDLIB
  7931. ! inst-lib:    libmh.so libmh.sa
  7932.           -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
  7933. --- 147,149 ----
  7934.   @BEGIN: SHAREDLIB
  7935. ! inst-lib:    libmh.so $(LIBSA)
  7936.           -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
  7937. ***************
  7938. *** 143,144 ****
  7939. --- 154,156 ----
  7940.           -@echo ""
  7941. + @BEGIN: SUN4SHLIB
  7942.           -rm -f $(SLIBDIR)/libmh.sa.$(SLIBVER)
  7943. ***************
  7944. *** 146,147 ****
  7945. --- 158,162 ----
  7946.           -@chmod $(PGMPROT) $(SLIBDIR)/libmh.sa.$(SLIBVER)
  7947. + @BEGIN: RANLIB
  7948. +         cd $(SLIBDIR); ranlib libmh.sa.$(SLIBVER)
  7949. + @END: RANLIB
  7950.           -@ls -l $(SLIBDIR)/libmh.sa.*
  7951. ***************
  7952. *** 149,150 ****
  7953. --- 164,166 ----
  7954.           -@echo ""
  7955. + @END: SUN4SHLIB
  7956.   @END: SHAREDLIB
  7957. ***************
  7958. *** 414,418 ****
  7959.   #m_update.o: /usr/include/signal.h
  7960. - m_whatnow.o: m_whatnow.c
  7961. - m_whatnow.o: ../h/mh.h
  7962. - #m_whatnow.o: /usr/include/stdio.h
  7963.   makedir.o: makedir.c
  7964. --- 430,431 ----
  7965. *** ../mh-6.7.2/conf/makefiles/support/bboards    Tue Dec 18 13:34:39 1990
  7966. --- conf/makefiles/support/bboards    Tue Nov  3 19:30:52 1992
  7967. ***************
  7968. *** 4,6 ****
  7969.   #    @(MHWARNING)
  7970. ! # @(#)$Id: bboards,v 2.9 90/12/18 13:34:38 mh Exp $
  7971.   ##############################################################################
  7972. --- 4,6 ----
  7973.   #    @(MHWARNING)
  7974. ! # @(#)$Id: bboards,v 2.12 1992/11/04 03:30:31 jromine Exp $
  7975.   ##############################################################################
  7976. ***************
  7977. *** 41,45 ****
  7978.   LDFLAGS    =    $(LDOPTIONS)
  7979. ! LIBES1    =    ../../zotnet/libzot.a
  7980.   @BEGIN: STDLIB
  7981. ! LIBES2    =    ../../config/config.o ../../sbr/libmh.a $(LIBES1)
  7982.   LDLIBS1    =    $(LIBES1) $(LDOPTLIB)
  7983. --- 41,46 ----
  7984.   LDFLAGS    =    $(LDOPTIONS)
  7985. ! LIBES1    =    ../../zotnet/libzot.a ../../mts/libmts.a
  7986.   @BEGIN: STDLIB
  7987. ! LIBES2    =    ../../config/config.o ../../config/version.o \
  7988. !         ../../sbr/libmh.a $(LIBES1)
  7989.   LDLIBS1    =    $(LIBES1) $(LDOPTLIB)
  7990. ***************
  7991. *** 47,50 ****
  7992.   @END: STDLIB
  7993.   @BEGIN: SHAREDLIB
  7994. ! LIBES2    =    ../../config/config.o ../../sbr/libmh.so $(LIBES1)
  7995.   LDLIBS1    =    $(LIBES1) $(LDOPTLIB)
  7996. --- 48,55 ----
  7997.   @END: STDLIB
  7998. + @BEGIN: SUN4SHLIB
  7999. + SLIBVER    =    .@(SLIBVER)
  8000. + @END: SUN4SHLIB
  8001.   @BEGIN: SHAREDLIB
  8002. ! LIBES2    =    ../../config/config.o ../../config/version.o \
  8003. !         ../../sbr/libmh.so $(LIBES1)
  8004.   LDLIBS1    =    $(LIBES1) $(LDOPTLIB)
  8005. ***************
  8006. *** 51,54 ****
  8007.   LDLIBS2    =    $(LIBES2) $(LDOPTLIB)
  8008. ! LDLIBS2    =    ../../config/config.o -Bdynamic @(SLDFLAG) -lmh \
  8009. !         $(LIBES1) $(LDOPTLIB)
  8010.   @END: SHAREDLIB
  8011. --- 56,59 ----
  8012.   LDLIBS2    =    $(LIBES2) $(LDOPTLIB)
  8013. ! LDLIBS2    =    ../../config/config.o ../../config/version.o \
  8014. !         -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
  8015.   @END: SHAREDLIB
  8016. ***************
  8017. *** 252,253 ****
  8018. --- 257,259 ----
  8019.   unconfig:    distribution
  8020. +         -rm -f mmdfII/bboards/lock.c
  8021.           -rm -f Makefile
  8022. *** ../mh-6.7.2/conf/makefiles/support/general    Thu Apr  5 16:05:13 1990
  8023. --- conf/makefiles/support/general    Fri Nov 20 20:00:41 1992
  8024. ***************
  8025. *** 4,6 ****
  8026.   #    @(MHWARNING)
  8027. ! # @(#)$Id: general,v 1.10 90/04/05 15:16:25 sources Exp $
  8028.   ##############################################################################
  8029. --- 4,6 ----
  8030.   #    @(MHWARNING)
  8031. ! # @(#)$Id: general,v 1.18 1992/10/28 18:56:06 jromine Exp $
  8032.   ##############################################################################
  8033. ***************
  8034. *** 16,17 ****
  8035. --- 16,22 ----
  8036.   @END: BBSERVER
  8037. + @BEGIN: MIME
  8038. + IOPTMIME=    inst-mhndefs inst-viamail
  8039. + UOPTMIME=    mhn_defaults viamail
  8040. + TOPTMIME=    mhn_defaults viamail
  8041. + @END: MIME
  8042.   REMOVE    =    @(MHREMOVE)
  8043. ***************
  8044. *** 18,19 ****
  8045. --- 23,26 ----
  8046.   FILPROT    =    0644
  8047. + PGMPROT    =    0755
  8048. + CP      =       @(CP)
  8049.   
  8050. ***************
  8051. *** 21,23 ****
  8052.           rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
  8053. !         mhl.body scan.mailx scan.size scan.time scan.timely $(TOPTMISC)
  8054.   
  8055. --- 28,31 ----
  8056.           rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
  8057. !         mhl.body mhl.headers scan.default scan.mailx scan.size \
  8058. !         scan.time scan.timely packmbox $(TOPTMISC) $(TOPTMIME)
  8059.   
  8060. ***************
  8061. *** 38,41 ****
  8062.           inst-forwcomps inst-rcvdistcomps inst-replcomps inst-digest \
  8063. !         inst-format inst-forward inst-body inst-mailx inst-size \
  8064. !         inst-time inst-timely $(IOPTMISC)
  8065.   
  8066. --- 46,50 ----
  8067.           inst-forwcomps inst-rcvdistcomps inst-replcomps inst-digest \
  8068. !         inst-format inst-forward inst-body inst-headers inst-mailx \
  8069. !         inst-default inst-size inst-time inst-timely \
  8070. !         inst-packmbox $(IOPTMISC) $(IOPTMIME)
  8071.   
  8072. ***************
  8073. *** 51,54 ****
  8074.               rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
  8075. !             mhl.body scan.mailx scan.size scan.time scan.timely \
  8076. !             $(UOPTMISC)
  8077.   
  8078. --- 60,64 ----
  8079.               rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
  8080. !             mhl.body mhl.headers scan.default scan.mailx scan.size \
  8081. !             scan.time scan.timely viamail packmbox \
  8082. !             $(UOPTMISC) $(UOPTMIME)
  8083.   
  8084. ***************
  8085. *** 64,66 ****
  8086.               $(REMOVE) $@ zMailAliases; \
  8087. !             cp MailAliases $@; \
  8088.           else \
  8089. --- 74,76 ----
  8090.               $(REMOVE) $@ zMailAliases; \
  8091. !             $(CP) MailAliases $@; \
  8092.           else \
  8093. ***************
  8094. *** 77,79 ****
  8095.           -$(REMOVE) $@ zcomponents
  8096. !         cp components $@
  8097.           -@chmod $(FILPROT) $@
  8098. --- 87,89 ----
  8099.           -$(REMOVE) $@ zcomponents
  8100. !         $(CP) components $@
  8101.           -@chmod $(FILPROT) $@
  8102. ***************
  8103. *** 87,89 ****
  8104.           -$(REMOVE) $@ zdigestcomps
  8105. !         cp digestcomps $@
  8106.           -@chmod $(FILPROT) $@
  8107. --- 97,99 ----
  8108.           -$(REMOVE) $@ zdigestcomps
  8109. !         $(CP) digestcomps $@
  8110.           -@chmod $(FILPROT) $@
  8111. ***************
  8112. *** 97,99 ****
  8113.           -$(REMOVE) $@ zdistcomps
  8114. !         cp distcomps $@
  8115.           -@chmod $(FILPROT) $@
  8116. --- 107,109 ----
  8117.           -$(REMOVE) $@ zdistcomps
  8118. !         $(CP) distcomps $@
  8119.           -@chmod $(FILPROT) $@
  8120. ***************
  8121. *** 107,109 ****
  8122.           -$(REMOVE) $@ zforwcomps
  8123. !         cp forwcomps $@
  8124.           -@chmod $(FILPROT) $@
  8125. --- 117,119 ----
  8126.           -$(REMOVE) $@ zforwcomps
  8127. !         $(CP) forwcomps $@
  8128.           -@chmod $(FILPROT) $@
  8129. ***************
  8130. *** 117,119 ****
  8131.           -$(REMOVE) $@ zrcvdistcomps
  8132. !         cp rcvdistcomps $@
  8133.           -@chmod $(FILPROT) $@
  8134. --- 127,129 ----
  8135.           -$(REMOVE) $@ zrcvdistcomps
  8136. !         $(CP) rcvdistcomps $@
  8137.           -@chmod $(FILPROT) $@
  8138. ***************
  8139. *** 127,129 ****
  8140.           -$(REMOVE) $@ zreplcomps
  8141. !         cp replcomps $@
  8142.           -@chmod $(FILPROT) $@
  8143. --- 137,139 ----
  8144.           -$(REMOVE) $@ zreplcomps
  8145. !         $(CP) replcomps $@
  8146.           -@chmod $(FILPROT) $@
  8147. ***************
  8148. *** 137,139 ****
  8149.           -$(REMOVE) $@ zmhl.digest
  8150. !         cp mhl.digest $@
  8151.           -@chmod $(FILPROT) $@
  8152. --- 147,149 ----
  8153.           -$(REMOVE) $@ zmhl.digest
  8154. !         $(CP) mhl.digest $@
  8155.           -@chmod $(FILPROT) $@
  8156. ***************
  8157. *** 147,149 ****
  8158.           -$(REMOVE) $@ zmhl.format
  8159. !         cp mhl.format $@
  8160.           -@chmod $(FILPROT) $@
  8161. --- 157,159 ----
  8162.           -$(REMOVE) $@ zmhl.format
  8163. !         $(CP) mhl.format $@
  8164.           -@chmod $(FILPROT) $@
  8165. ***************
  8166. *** 157,159 ****
  8167.           -$(REMOVE) $@ zmhl.forward
  8168. !         cp mhl.forward $@
  8169.           -@chmod $(FILPROT) $@
  8170. --- 167,169 ----
  8171.           -$(REMOVE) $@ zmhl.forward
  8172. !         $(CP) mhl.forward $@
  8173.           -@chmod $(FILPROT) $@
  8174. ***************
  8175. *** 167,169 ****
  8176.           -$(REMOVE) $@ zmhl.body
  8177. !         cp mhl.body $@
  8178.           -@chmod $(FILPROT) $@
  8179. --- 177,179 ----
  8180.           -$(REMOVE) $@ zmhl.body
  8181. !         $(CP) mhl.body $@
  8182.           -@chmod $(FILPROT) $@
  8183. ***************
  8184. *** 173,174 ****
  8185. --- 183,203 ----
  8186.   
  8187. + inst-headers:    $(ETCDIR)/mhl.headers
  8188. + $(ETCDIR)/mhl.headers:    mhl.headers
  8189. +         -$(REMOVE) $@ zmhl.headers
  8190. +         cp mhl.headers $@
  8191. +         -@chmod $(FILPROT) $@
  8192. +         -@ls -l $@
  8193. +         -@echo ""
  8194. + inst-default:    $(ETCDIR)/scan.default
  8195. + $(ETCDIR)/scan.default:    scan.default
  8196. +         -$(REMOVE) $@ zscan.default
  8197. +         $(CP) scan.default $@
  8198. +         -@chmod $(FILPROT) $@
  8199. +         -@ls -l $@
  8200. +         -@echo ""
  8201.   inst-mailx:    $(ETCDIR)/scan.mailx
  8202. ***************
  8203. *** 177,179 ****
  8204.           -$(REMOVE) $@ zscan.mailx
  8205. !         cp scan.mailx $@
  8206.           -@chmod $(FILPROT) $@
  8207. --- 206,208 ----
  8208.           -$(REMOVE) $@ zscan.mailx
  8209. !         $(CP) scan.mailx $@
  8210.           -@chmod $(FILPROT) $@
  8211. ***************
  8212. *** 187,189 ****
  8213.           -$(REMOVE) $@ zscan.size
  8214. !         cp scan.size $@
  8215.           -@chmod $(FILPROT) $@
  8216. --- 216,218 ----
  8217.           -$(REMOVE) $@ zscan.size
  8218. !         $(CP) scan.size $@
  8219.           -@chmod $(FILPROT) $@
  8220. ***************
  8221. *** 197,199 ****
  8222.           -$(REMOVE) $@ zscan.time
  8223. !         cp scan.time $@
  8224.           -@chmod $(FILPROT) $@
  8225. --- 226,228 ----
  8226.           -$(REMOVE) $@ zscan.time
  8227. !         $(CP) scan.time $@
  8228.           -@chmod $(FILPROT) $@
  8229. ***************
  8230. *** 207,209 ****
  8231.           -$(REMOVE) $@ zscan.timely
  8232. !         cp scan.timely $@
  8233.           -@chmod $(FILPROT) $@
  8234. --- 236,238 ----
  8235.           -$(REMOVE) $@ zscan.timely
  8236. !         $(CP) scan.timely $@
  8237.           -@chmod $(FILPROT) $@
  8238. ***************
  8239. *** 213,214 ****
  8240. --- 242,253 ----
  8241.   
  8242. + inst-packmbox:    $(ETCDIR)/packmbox
  8243. + $(ETCDIR)/packmbox:    packmbox.sh
  8244. +         -$(REMOVE) $@ zpackmbox.sh
  8245. +         cp packmbox.sh $@
  8246. +         -@chmod $(PGMPROT) $@
  8247. +         -@ls -l $@
  8248. +         -@echo ""
  8249.   inst-bboards:    $(ETCDIR)/BBoardAliases
  8250. ***************
  8251. *** 218,220 ****
  8252.               $(REMOVE) $@ zBBoardAliases; \
  8253. !             cp BBoardAliases $@; \
  8254.           else \
  8255. --- 257,259 ----
  8256.               $(REMOVE) $@ zBBoardAliases; \
  8257. !             $(CP) BBoardAliases $@; \
  8258.           else \
  8259. ***************
  8260. *** 228,229 ****
  8261. --- 267,291 ----
  8262.   
  8263. + inst-viamail:    $(ETCDIR)/viamail
  8264. + $(ETCDIR)/viamail:    viamail.sh
  8265. +         -$(REMOVE) $@ zviamail.sh
  8266. +         cp viamail.sh $@
  8267. +         -@chmod $(PGMPROT) $@
  8268. +         -@ls -l $@
  8269. +         -@echo ""
  8270. + inst-mhndefs:    $(ETCDIR)/mhn_defaults
  8271. + $(ETCDIR)/mhn_defaults:    true
  8272. +         -if [ ! -f $@ ]; then \
  8273. +             ./bootmhn.sh $(ETCDIR); \
  8274. +         else \
  8275. +             echo "Will not overwrite existing $@"; \
  8276. +         fi
  8277. +         -@chmod $(FILPROT) $@
  8278. +         -@ls -l $@
  8279. +         -@echo ""
  8280.   ##############################################################################
  8281. ***************
  8282. *** 242 ****
  8283. --- 304,306 ----
  8284.   unclean:;    -rm -f z* _* :* core MAKEGEN
  8285. + true:;
  8286. *** ../mh-6.7.2/conf/makefiles/support/pop    Tue Dec 18 13:34:38 1990
  8287. --- conf/makefiles/support/pop    Tue Nov 24 20:19:04 1992
  8288. ***************
  8289. *** 4,6 ****
  8290.   #    @(MHWARNING)
  8291. ! # @(#)$Id: pop,v 2.9 90/12/18 13:34:33 mh Exp $
  8292.   ##############################################################################
  8293. --- 4,6 ----
  8294.   #    @(MHWARNING)
  8295. ! # @(#)$Id: pop,v 2.26 1992/11/25 04:18:59 jromine Exp $
  8296.   ##############################################################################
  8297. ***************
  8298. *** 9,11 ****
  8299.   BINDIR    =    $(DESTDIR)@(MHBINPATH)
  8300. ! ETCDIR    =    /usr/etc
  8301.   LIBDIR    =    $(DESTDIR)@(MHETCPATH)
  8302. --- 9,11 ----
  8303.   BINDIR    =    $(DESTDIR)@(MHBINPATH)
  8304. ! ETCDIR    =    $(DESTDIR)@(MHPOPDPATH)
  8305.   LIBDIR    =    $(DESTDIR)@(MHETCPATH)
  8306. ***************
  8307. *** 14,15 ****
  8308. --- 14,18 ----
  8309.   LDOPTLIB=    @(LDOPTLIB)
  8310. + @BEGIN: MPOP
  8311. + LDCURSES=    @(LDCURSES)
  8312. + @END: MPOP
  8313.   PGMPROT    =    0711
  8314. ***************
  8315. *** 18,24 ****
  8316.   POPUID    =    pop
  8317.   @BEGIN: POP
  8318. ! ALL    =    popd popaka popwrd popsbr
  8319. ! INST-ALL=    inst-popd inst-popaka inst-popwrd
  8320. ! LALL    =    l-popd l-popaka l-popwrd l-popsbr
  8321. ! TALL    =    xpopd xpopaka xpopwrd
  8322.   @END: POP
  8323. --- 21,33 ----
  8324.   POPUID    =    pop
  8325. + @BEGIN: APOP
  8326. + Apop    =    popauth
  8327. + IApop    =    inst-popauth
  8328. + Lpop    =    l-popauth
  8329. + Tpop    =    xpopauth
  8330. + @END: APOP
  8331.   @BEGIN: POP
  8332. ! ALL    =    popd popaka $(Apop) popwrd
  8333. ! INST-ALL=    inst-popd inst-popaka $(IApop) inst-popwrd
  8334. ! LALL    =    l-popd l-popaka $(Lpop) l-popwrd
  8335. ! TALL    =    xpopd xpopaka $(Tpop) xpopwrd
  8336.   @END: POP
  8337. ***************
  8338. *** 25,26 ****
  8339. --- 34,36 ----
  8340.   
  8341. + CP      =       @(CP)
  8342.   CC      =    @(MHCOMPILER)
  8343. ***************
  8344. *** 39,41 ****
  8345.   LDFLAGS    =    $(LDOPTIONS)
  8346. ! LIBES1    =    ../../zotnet/libzot.a
  8347.   @BEGIN: STDLIB
  8348. --- 49,51 ----
  8349.   LDFLAGS    =    $(LDOPTIONS)
  8350. ! LIBES1    =    ../../zotnet/libzot.a ../../mts/libmts.a
  8351.   @BEGIN: STDLIB
  8352. ***************
  8353. *** 45,46 ****
  8354. --- 55,59 ----
  8355.   @END: STDLIB
  8356. + @BEGIN: SUN4SHLIB
  8357. + SLIBVER    =    .@(SLIBVER)
  8358. + @END: SUN4SHLIB
  8359.   @BEGIN: SHAREDLIB
  8360. ***************
  8361. *** 49,51 ****
  8362.   LDLIBS2    =    ../../config/config.o ../../config/version.o \
  8363. !         -Bdynamic @(SLDFLAG) -lmh $(LIBES1) $(LDOPTLIB)
  8364.   @END: SHAREDLIB
  8365. --- 62,64 ----
  8366.   LDLIBS2    =    ../../config/config.o ../../config/version.o \
  8367. !         -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
  8368.   @END: SHAREDLIB
  8369. ***************
  8370. *** 57,58 ****
  8371. --- 70,72 ----
  8372.   
  8373. + .c:;        echo $@
  8374.   
  8375. ***************
  8376. *** 81,82 ****
  8377. --- 95,97 ----
  8378.           -cd $(LIBDIR); rm -f popaka popwrd
  8379. +         -cd $(BINDIR); rm -f popauth
  8380.   
  8381. ***************
  8382. *** 92,94 ****
  8383.           -rm -f $@
  8384. !         cp xpopd $@
  8385.           -chmod 700 $@
  8386. --- 107,109 ----
  8387.           -rm -f $@
  8388. !         $(CP) xpopd $@
  8389.           -chmod 700 $@
  8390. ***************
  8391. *** 100,104 ****
  8392.   xpopd:        popd.o popser.o syslog.o \
  8393. !             ../../uip/dropsbr.o $(LIBES2)
  8394.           $(LD) $(LDFLAGS) -o $@ popd.o popser.o syslog.o \
  8395. !             ../../uip/dropsbr.o $(LDLIBS2)
  8396.   
  8397. --- 115,127 ----
  8398.   xpopd:        popd.o popser.o syslog.o \
  8399. !             ../../uip/dropsbr.o \
  8400. ! @BEGIN: MPOP
  8401. !             ../../uip/scansbr.o \
  8402. ! @END: MPOP
  8403. !             $(LIBES2)
  8404.           $(LD) $(LDFLAGS) -o $@ popd.o popser.o syslog.o \
  8405. !             ../../uip/dropsbr.o \
  8406. ! @BEGIN: MPOP
  8407. !             ../../uip/scansbr.o \
  8408. ! @END: MPOP
  8409. !             $(LDLIBS2) $(LDCURSES)
  8410.   
  8411. ***************
  8412. *** 105,107 ****
  8413.   l-popd:;    $(LINT) $(LFLAGS) popd.c popser.c \
  8414. !             ../../uip/dropsbr.c $(LLIBS2)
  8415.   
  8416. --- 128,134 ----
  8417.   l-popd:;    $(LINT) $(LFLAGS) popd.c popser.c \
  8418. !             ../../uip/dropsbr.c \
  8419. ! @BEGIN: MPOP
  8420. !             ../../uip/scansbr.c \
  8421. ! @END: MPOP
  8422. !             $(LLIBS2)
  8423.   
  8424. ***************
  8425. *** 116,118 ****
  8426.           -$(REMOVE) $@ zpopaka
  8427. !         cp xpopaka $@
  8428.           -@chmod $(PGMPROT) $@
  8429. --- 143,145 ----
  8430.           -$(REMOVE) $@ zpopaka
  8431. !         $(CP) xpopaka $@
  8432.           -@chmod $(PGMPROT) $@
  8433. ***************
  8434. *** 130,131 ****
  8435. --- 157,181 ----
  8436.   ################################################################
  8437. + # popauth
  8438. + ################################################################
  8439. + inst-popauth:    $(BINDIR)/popauth
  8440. + $(BINDIR)/popauth:    xpopauth
  8441. +         -$(REMOVE) $@ zpopauth
  8442. +         cp xpopauth $@
  8443. +         -@chmod $(PGMPROT) $@
  8444. +         -$(CHOWN) $(POPUID) $@
  8445. +         chmod u+s $@
  8446. +         -@ls -l $@
  8447. +         -@echo ""
  8448. + popauth:    xpopauth
  8449. + xpopauth:    popauth.o $(LIBES1)
  8450. +         $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2)
  8451. + l-popauth:;    $(LINT) $(LFLAGS) popauth.c $(LLIBS2)
  8452. + ################################################################
  8453.   # popwrd
  8454. ***************
  8455. *** 138,140 ****
  8456.           -chmod u-s zpopwrd
  8457. !         cp xpopwrd $@
  8458.           -chmod $(PGMPROT) $@
  8459. --- 188,190 ----
  8460.           -chmod u-s zpopwrd
  8461. !         $(CP) xpopwrd $@
  8462.           -chmod $(PGMPROT) $@
  8463. ***************
  8464. *** 154,164 ****
  8465.   ################################################################
  8466. - # popsbr
  8467. - ################################################################
  8468. - popsbr:        popsbr.o
  8469. - l-popsbr:;    $(LINT) $(LFLAGS) popsbr.c $(LLIBS)
  8470. - ################################################################
  8471.   # smtpd
  8472. --- 204,205 ----
  8473. ***************
  8474. *** 170,172 ****
  8475.           -$(REMOVE) $@ zsmtpd
  8476. !         cp xsmtpd $@
  8477.           -chmod 700 $@
  8478. --- 211,213 ----
  8479.           -$(REMOVE) $@ zsmtpd
  8480. !         $(CP) xsmtpd $@
  8481.           -chmod 700 $@
  8482. ***************
  8483. *** 188,189 ****
  8484. --- 229,231 ----
  8485.   unconfig:    distribution
  8486. +         -rm -f mmdfII/pop/lock.c
  8487.           -rm -f Makefile
  8488. ***************
  8489. *** 202,204 ****
  8490.   
  8491. ! MODULES    =    popd popser popaka popwrd popsbr
  8492.   
  8493. --- 244,246 ----
  8494.   
  8495. ! MODULES    =    popd popser popaka popauth popwrd
  8496.   
  8497. ***************
  8498. *** 216,218 ****
  8499.           echo 'w' >> eddep
  8500. !         cp Makefile _Makefile
  8501.           ed - Makefile < eddep
  8502. --- 258,260 ----
  8503.           echo 'w' >> eddep
  8504. !         $(CP) Makefile _Makefile
  8505.           ed - Makefile < eddep
  8506. ***************
  8507. *** 253,254 ****
  8508. --- 295,297 ----
  8509.   #popser.o: /usr/include/sys/stat.h
  8510. + popser.o: popauth.h
  8511.   popaka.o: popaka.c
  8512. ***************
  8513. *** 256,257 ****
  8514. --- 299,305 ----
  8515.   popaka.o: ../../zotnet/bboards.h
  8516. + popauth.o: popauth.c
  8517. + popauth.o: ../../h/mh.h
  8518. + popauth.o: popauth.h
  8519. + popauth.o: ../../zotnet/bboards.h
  8520. + popauth.o: ../../zotnet/mts.h
  8521.   popwrd.o: popwrd.c
  8522. ***************
  8523. *** 265,270 ****
  8524.   #popwrd.o: /usr/include/sys/file.h
  8525. - popsbr.o: popsbr.c
  8526. - popsbr.o: ../../h/strings.h
  8527. - #popsbr.o: /usr/include/stdio.h
  8528. - #popsbr.o: /usr/include/signal.h
  8529.   # DEPENDENCIES MUST END AT END OF FILE
  8530. --- 313,314 ----
  8531. *** ../mh-6.7.2/conf/makefiles/uip    Fri Jan 24 15:19:02 1992
  8532. --- conf/makefiles/uip    Wed Nov 18 08:54:39 1992
  8533. ***************
  8534. *** 4,6 ****
  8535.   #    @(MHWARNING)
  8536. ! # @(#)$Id: uip,v 2.14 1992/01/24 23:18:46 jromine Exp $
  8537.   ##############################################################################
  8538. --- 4,6 ----
  8539.   #    @(MHWARNING)
  8540. ! # @(#)$Id: uip,v 2.38 1992/11/18 16:54:29 jromine Exp $
  8541.   ##############################################################################
  8542. ***************
  8543. *** 71,72 ****
  8544. --- 71,78 ----
  8545.   POPLLIBS=    popsbr.c
  8546. + @BEGIN: MPOP
  8547. + POPCMDS    =    popi
  8548. + IPOPCMDS=    inst-popi
  8549. + LPOPCMDS=    l-popi
  8550. + TPOPCMS=    xpopi
  8551. + @END: MPOP
  8552.   @BEGIN: SENDMTSHACK
  8553. ***************
  8554. *** 77,79 ****
  8555.   @END: SENDMTSHACK
  8556. ! @END: POP
  8557.   @BEGIN: BPOP
  8558. --- 83,87 ----
  8559.   @END: SENDMTSHACK
  8560. ! @BEGIN: KPOP
  8561. ! KRBLIB  =       -lkrb -ldes
  8562. ! @END: KPOP
  8563.   @BEGIN: BPOP
  8564. ***************
  8565. *** 84,87 ****
  8566.   PSHLIB    =    pshsbr.o
  8567. ! PSHLLIBS=    pshsbr.c 
  8568.   @END: NNTP
  8569.   @BEGIN: TMA
  8570. --- 92,99 ----
  8571.   PSHLIB    =    pshsbr.o
  8572. ! PSHLLIBS=    -DPSHSBR popsbr.c 
  8573.   @END: NNTP
  8574. + @END: POP
  8575. + @BEGIN: HESIOD
  8576. + HESLIB    =    -lhesiod
  8577. + @END: HESIOD
  8578.   @BEGIN: TMA
  8579. ***************
  8580. *** 102,103 ****
  8581. --- 114,118 ----
  8582.   
  8583. + CP      =       @(CP)
  8584. + LN      =       @(LN)
  8585.   CC    =    @(MHCOMPILER)
  8586. ***************
  8587. *** 121,122 ****
  8588. --- 136,140 ----
  8589.   @END: STDLIB
  8590. + @BEGIN: SUN4SHLIB
  8591. + SLIBVER    =    .@(SLIBVER)
  8592. + @END: SUN4SHLIB
  8593.   @BEGIN: SHAREDLIB
  8594. ***************
  8595. *** 124,126 ****
  8596.           ../zotnet/libzot.a
  8597. ! LDLIBES    =    ../config/config.o -Bdynamic @(SLDFLAG) -lmh \
  8598.           ../mts/libmts.a  ../zotnet/libzot.a
  8599. --- 142,144 ----
  8600.           ../zotnet/libzot.a
  8601. ! LDLIBES    =    ../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
  8602.           ../mts/libmts.a  ../zotnet/libzot.a
  8603. ***************
  8604. *** 135,136 ****
  8605. --- 153,157 ----
  8606.   CMDS    =    ali anno burst comp dist folder folders forw inc mark mhmail \
  8607. + @BEGIN: MIME
  8608. +         mhn \
  8609. + @END: MIME
  8610.           mhpath msgchk msh next packf pick prev prompter refile repl \
  8611. ***************
  8612. *** 137,141 ****
  8613.           rmf rmm scan send show sortm vmh whatnow whom $(BBCMDS) \
  8614. !         $(TMACMDS)
  8615.   MISC    =    ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
  8616. !         rcvtty fmtdump sendmail \
  8617.   @BEGIN: SENDMTS
  8618. --- 158,165 ----
  8619.           rmf rmm scan send show sortm vmh whatnow whom $(BBCMDS) \
  8620. !         $(TMACMDS) $(POPCMDS)
  8621.   MISC    =    ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
  8622. !         rcvtty fmtdump mhparam \
  8623. ! @BEGIN: SMTP
  8624. !         sendmail \
  8625. ! @END: SMTP
  8626.   @BEGIN: SENDMTS
  8627. ***************
  8628. *** 147,148 ****
  8629. --- 171,175 ----
  8630.           inst-folders inst-forw inst-inc inst-mark inst-mhmail \
  8631. + @BEGIN: MIME
  8632. +         inst-mhn \
  8633. + @END: MIME
  8634.           inst-mhpath inst-msgchk inst-msh inst-next inst-packf \
  8635. ***************
  8636. *** 150,152 ****
  8637.           inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
  8638. !         inst-vmh inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS)
  8639.   IMISC    =    inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
  8640. --- 177,180 ----
  8641.           inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
  8642. !         inst-vmh inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS) \
  8643. !         $(IPOPCMDS)
  8644.   IMISC    =    inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
  8645. ***************
  8646. *** 153,155 ****
  8647.           inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
  8648. !         inst-fmtdump inst-sendmail $(IMTSMISC) \
  8649.   @BEGIN: SENDMTS
  8650. --- 181,187 ----
  8651.           inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
  8652. !         inst-fmtdump inst-mhparam \
  8653. ! @BEGIN: SMTP
  8654. !         inst-sendmail \
  8655. ! @END: SMTP
  8656. !         $(IMTSMISC) \
  8657.   @BEGIN: SENDMTS
  8658. ***************
  8659. *** 160,166 ****
  8660.   LCMDS    =    l-ali l-anno l-burst l-comp l-dist l-folder l-forw l-inc \
  8661. !         l-mark l-mhmail l-mhpath l-msgchk l-msh l-packf l-pick \
  8662.           l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
  8663. !         l-show l-sortm l-vmh l-whatnow l-whom $(LBBCMDS) $(LTMACMDS)
  8664.   LMISC    =    l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
  8665. !         l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-sendmail \
  8666.           $(LMTSMISC) $(LBBMISC) \
  8667. --- 192,206 ----
  8668.   LCMDS    =    l-ali l-anno l-burst l-comp l-dist l-folder l-forw l-inc \
  8669. !         l-mark l-mhmail \
  8670. ! @BEGIN: MIME
  8671. !         l-mhn \
  8672. ! @END: MIME
  8673. !         l-mhpath l-msgchk l-msh l-packf l-pick \
  8674.           l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
  8675. !         l-show l-sortm l-vmh l-whatnow l-whom $(LBBCMDS) $(LTMACMDS) \
  8676. !         $(LPOPCMDS)
  8677.   LMISC    =    l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
  8678. !         l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-mhparam \
  8679. ! @BEGIN: SMTP
  8680. !         l-sendmail \
  8681. ! @END: SMTP
  8682.           $(LMTSMISC) $(LBBMISC) \
  8683. ***************
  8684. *** 172,178 ****
  8685.   TCMDS    =    xali xanno xburst xcomp xdist xfolder xforw xinc xmark \
  8686. !         xmhmail xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
  8687.           xrepl xrmf xrmm xscan xsend xshow xsortm xvmh xwhatnow xwhom \
  8688. !         $(TBBCMDS) $(TTMACMDS)
  8689.   TMISC    =    xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
  8690. !         xrcvstore xrcvtty xfmtdump xsendmail \
  8691.           $(TMTSMISC) $(TBBMISC) $(TPOPMISC) \
  8692. --- 212,225 ----
  8693.   TCMDS    =    xali xanno xburst xcomp xdist xfolder xforw xinc xmark \
  8694. !         xmhmail \
  8695. ! @BEGIN: MIME
  8696. !         xmhn \
  8697. ! @END: MIME
  8698. !         xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
  8699.           xrepl xrmf xrmm xscan xsend xshow xsortm xvmh xwhatnow xwhom \
  8700. !         $(TBBCMDS) $(TTMACMDS) $(TPOPCMDS)
  8701.   TMISC    =    xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
  8702. !         xrcvstore xrcvtty xfmtdump xmhparam \
  8703. ! @BEGIN: SMTP
  8704. !         xsendmail \
  8705. ! @END: SMTP
  8706.           $(TMTSMISC) $(TBBMISC) $(TPOPMISC) \
  8707. ***************
  8708. *** 217,219 ****
  8709.           -$(REMOVE) $@ zali
  8710. !         cp xali $@
  8711.           -@chmod $(PGMPROT) $@
  8712. --- 264,266 ----
  8713.           -$(REMOVE) $@ zali
  8714. !         $(CP) xali $@
  8715.           -@chmod $(PGMPROT) $@
  8716. ***************
  8717. *** 234,240 ****
  8718.           -$(REMOVE) $@ zanno
  8719. !         cp xanno $@
  8720.           -@chmod $(PGMPROT) $@
  8721. - @BEGIN: UCI
  8722. -         -@ln -s $@ $(BINDIR)/fanno
  8723. - @END: UCI
  8724.           -@ls -l $@
  8725. --- 281,284 ----
  8726.           -$(REMOVE) $@ zanno
  8727. !         $(CP) xanno $@
  8728.           -@chmod $(PGMPROT) $@
  8729.           -@ls -l $@
  8730. ***************
  8731. *** 254,256 ****
  8732.           -$(REMOVE) $@ zap
  8733. !         cp xap $@
  8734.           -@chmod $(PGMPROT) $@
  8735. --- 298,300 ----
  8736.           -$(REMOVE) $@ zap
  8737. !         $(CP) xap $@
  8738.           -@chmod $(PGMPROT) $@
  8739. ***************
  8740. *** 274,276 ****
  8741.   @END: BPOP
  8742. !         cp xbbc $@
  8743.           -@chmod $(PGMPROT) $@
  8744. --- 318,320 ----
  8745.   @END: BPOP
  8746. !         $(CP) xbbc $@
  8747.           -@chmod $(PGMPROT) $@
  8748. ***************
  8749. *** 290,292 ****
  8750. --- 334,343 ----
  8751.   
  8752. + pshsbr.c:    popsbr.c
  8753. +         rm -f $@
  8754. +         $(LN) popsbr.c $@
  8755.   
  8756. + pshsbr.o:    pshsbr.c
  8757. +         $(CC) $(CFLAGS) -DPSHSBR -c pshsbr.c
  8758.   inst-bbl:    $(BINDIR)/bbl
  8759. ***************
  8760. *** 296,298 ****
  8761.           -chmod u-s zbbl
  8762. !         cp xbbl $@
  8763.           -chmod $(PGMPROT) $@
  8764. --- 347,349 ----
  8765.           -chmod u-s zbbl
  8766. !         $(CP) xbbl $@
  8767.           -chmod $(PGMPROT) $@
  8768. ***************
  8769. *** 315,317 ****
  8770.           -$(REMOVE) $@ zburst
  8771. !         cp xburst $@
  8772.           -@chmod $(PGMPROT) $@
  8773. --- 366,368 ----
  8774.           -$(REMOVE) $@ zburst
  8775. !         $(CP) xburst $@
  8776.           -@chmod $(PGMPROT) $@
  8777. ***************
  8778. *** 332,334 ****
  8779.           -$(REMOVE) $@ zcipher
  8780. !         cp xcipher $@
  8781.           -@chmod $(PGMPROT) $@
  8782. --- 383,385 ----
  8783.           -$(REMOVE) $@ zcipher
  8784. !         $(CP) xcipher $@
  8785.           -@chmod $(PGMPROT) $@
  8786. ***************
  8787. *** 349,351 ****
  8788.           -$(REMOVE) $@ zcomp
  8789. !         cp xcomp $@
  8790.           -@chmod $(PGMPROT) $@
  8791. --- 400,402 ----
  8792.           -$(REMOVE) $@ zcomp
  8793. !         $(CP) xcomp $@
  8794.           -@chmod $(PGMPROT) $@
  8795. ***************
  8796. *** 356,360 ****
  8797.   
  8798. ! xcomp:        comp.o \
  8799.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8800. !         $(LD) $(LDFLAGS) -o $@ comp.o \
  8801.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8802. --- 407,411 ----
  8803.   
  8804. ! xcomp:        comp.o whatnowproc.o \
  8805.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8806. !         $(LD) $(LDFLAGS) -o $@ comp.o whatnowproc.o \
  8807.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8808. ***************
  8809. *** 361,363 ****
  8810.   
  8811. ! l-comp:;    $(LINT) $(LFLAGS) comp.c \
  8812.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8813. --- 412,414 ----
  8814.   
  8815. ! l-comp:;    $(LINT) $(LFLAGS) comp.c whatnowproc.c \
  8816.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8817. ***************
  8818. *** 369,371 ****
  8819.           -$(REMOVE) $@ zconflict
  8820. !         cp xconflict $@
  8821.           -@chmod $(PGMPROT) $@
  8822. --- 420,422 ----
  8823.           -$(REMOVE) $@ zconflict
  8824. !         $(CP) xconflict $@
  8825.           -@chmod $(PGMPROT) $@
  8826. ***************
  8827. *** 386,388 ****
  8828.           -$(REMOVE) $@ zdecipher
  8829. !         cp xdecipher $@
  8830.           -@chmod $(PGMPROT) $@
  8831. --- 437,439 ----
  8832.           -$(REMOVE) $@ zdecipher
  8833. !         $(CP) xdecipher $@
  8834.           -@chmod $(PGMPROT) $@
  8835. ***************
  8836. *** 403,405 ****
  8837.           -$(REMOVE) $@ zdist
  8838. !         cp xdist $@
  8839.           -@chmod $(PGMPROT) $@
  8840. --- 454,456 ----
  8841.           -$(REMOVE) $@ zdist
  8842. !         $(CP) xdist $@
  8843.           -@chmod $(PGMPROT) $@
  8844. ***************
  8845. *** 410,414 ****
  8846.   
  8847. ! xdist:        dist.o \
  8848.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8849. !         $(LD) $(LDFLAGS) -o $@ dist.o \
  8850.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8851. --- 461,465 ----
  8852.   
  8853. ! xdist:        dist.o whatnowproc.o \
  8854.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8855. !         $(LD) $(LDFLAGS) -o $@ dist.o whatnowproc.o \
  8856.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8857. ***************
  8858. *** 415,417 ****
  8859.   
  8860. ! l-dist:;    $(LINT) $(LFLAGS) dist.c \
  8861.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8862. --- 466,468 ----
  8863.   
  8864. ! l-dist:;    $(LINT) $(LFLAGS) dist.c whatnowproc.c \
  8865.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8866. ***************
  8867. *** 423,425 ****
  8868.           -$(REMOVE) $@ zdp
  8869. !         cp xdp $@
  8870.           -@chmod $(PGMPROT) $@
  8871. --- 474,476 ----
  8872.           -$(REMOVE) $@ zdp
  8873. !         $(CP) xdp $@
  8874.           -@chmod $(PGMPROT) $@
  8875. ***************
  8876. *** 448,450 ****
  8877.   xfmtdump:        fmtdump.o trmsbr.o $(LIBES)
  8878. !         $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS) $(LDCURSES)
  8879.   
  8880. --- 499,501 ----
  8881.   xfmtdump:        fmtdump.o trmsbr.o $(LIBES)
  8882. !         $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS)
  8883.   
  8884. ***************
  8885. *** 458,460 ****
  8886.           -$(REMOVE) $@ zfolder
  8887. !         cp xfolder $@
  8888.           -@chmod $(PGMPROT) $@
  8889. --- 509,511 ----
  8890.           -$(REMOVE) $@ zfolder
  8891. !         $(CP) xfolder $@
  8892.           -@chmod $(PGMPROT) $@
  8893. ***************
  8894. *** 478,480 ****
  8895.           -$(REMOVE) $@ zforw
  8896. !         cp xforw $@
  8897.           -@chmod $(PGMPROT) $@
  8898. --- 529,531 ----
  8899.           -$(REMOVE) $@ zforw
  8900. !         $(CP) xforw $@
  8901.           -@chmod $(PGMPROT) $@
  8902. ***************
  8903. *** 485,489 ****
  8904.   
  8905. ! xforw:        forw.o \
  8906.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8907. !         $(LD) $(LDFLAGS) -o $@ forw.o \
  8908.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8909. --- 536,540 ----
  8910.   
  8911. ! xforw:        forw.o whatnowproc.o \
  8912.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
  8913. !         $(LD) $(LDFLAGS) -o $@ forw.o whatnowproc.o \
  8914.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS) 
  8915. ***************
  8916. *** 490,492 ****
  8917.   
  8918. ! l-forw:;    $(LINT) $(LFLAGS) forw.c \
  8919.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8920. --- 541,543 ----
  8921.   
  8922. ! l-forw:;    $(LINT) $(LFLAGS) forw.c whatnowproc.c \
  8923.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
  8924. ***************
  8925. *** 501,503 ****
  8926.   @END: POP
  8927. !         cp xinc $@
  8928.           -@chmod $(PGMPROT) $@
  8929. --- 552,554 ----
  8930.   @END: POP
  8931. !         $(CP) xinc $@
  8932.           -@chmod $(PGMPROT) $@
  8933. ***************
  8934. *** 516,522 ****
  8935.   
  8936. ! xinc:        inc.o scansbr.o \
  8937. !             dropsbr.o trmsbr.o $(POPLIB) $(TMALIB) $(LIBES)
  8938. !         $(LD) $(LDFLAGS) -o $@ inc.o scansbr.o \
  8939. !             dropsbr.o trmsbr.o $(POPLIB) $(TMALIB) $(LDLIBS) \
  8940. !             $(LDCURSES)
  8941.   
  8942. --- 567,573 ----
  8943.   
  8944. ! xinc:        inc.o scansbr.o dropsbr.o trmsbr.o \
  8945. !             $(POPLIB) $(TMALIB) $(LIBES)
  8946. !         $(LD) $(LDFLAGS) -o $@ inc.o scansbr.o dropsbr.o \
  8947. !             trmsbr.o $(POPLIB) $(TMALIB) $(KRBLIB) $(HESLIB) \
  8948. !             $(LDLIBS) $(LDCURSES)
  8949.   
  8950. ***************
  8951. *** 530,532 ****
  8952.           -$(REMOVE) $@ zinstall-mh
  8953. !         cp xinstall-mh $@
  8954.           -@chmod $(PGMPROT) $@
  8955. --- 581,583 ----
  8956.           -$(REMOVE) $@ zinstall-mh
  8957. !         $(CP) xinstall-mh $@
  8958.           -@chmod $(PGMPROT) $@
  8959. ***************
  8960. *** 547,549 ****
  8961.           -$(REMOVE) $@ zkdsc
  8962. !         cp xkdsc $@
  8963.           -@chmod $(PGMPROT) $@
  8964. --- 598,600 ----
  8965.           -$(REMOVE) $@ zkdsc
  8966. !         $(CP) xkdsc $@
  8967.           -@chmod $(PGMPROT) $@
  8968. ***************
  8969. *** 564,566 ****
  8970.           -$(REMOVE) $@ zmark
  8971. !         cp xmark $@
  8972.           -@chmod $(PGMPROT) $@
  8973. --- 615,617 ----
  8974.           -$(REMOVE) $@ zmark
  8975. !         $(CP) xmark $@
  8976.           -@chmod $(PGMPROT) $@
  8977. ***************
  8978. *** 581,583 ****
  8979.           -$(REMOVE) $@ zmhl
  8980. !         cp xmhl $@
  8981.           -@chmod $(PGMPROT) $@
  8982. --- 632,634 ----
  8983.           -$(REMOVE) $@ zmhl
  8984. !         $(CP) xmhl $@
  8985.           -@chmod $(PGMPROT) $@
  8986. ***************
  8987. *** 601,603 ****
  8988.           -$(REMOVE) $@ zmhmail
  8989. !         cp xmhmail $@
  8990.           -@chmod $(PGMPROT) $@
  8991. --- 652,654 ----
  8992.           -$(REMOVE) $@ zmhmail
  8993. !         $(CP) xmhmail $@
  8994.           -@chmod $(PGMPROT) $@
  8995. ***************
  8996. *** 614,615 ****
  8997. --- 665,701 ----
  8998.   
  8999. + inst-mhn:    $(BINDIR)/mhn
  9000. + $(BINDIR)/mhn:    xmhn
  9001. +         -$(REMOVE) $@ zmhn
  9002. +         cp xmhn $@
  9003. +         -@chmod $(PGMPROT) $@
  9004. +         -@ls -l $@
  9005. +         -@echo ""
  9006. + mhn:        xmhn
  9007. + xmhn:          mhn.o ftpsbr.o trmsbr.o $(LIBES) 
  9008. +         $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \
  9009. +                 $(LDLIBS) $(LDCURSES)
  9010. + l-mhn:;        $(LINT) $(LFLAGS) mhn.c ftpsbr.c trmsbr.c $(LLIBS)
  9011. + inst-mhparam:    $(BINDIR)/mhparam
  9012. + $(BINDIR)/mhparam:    xmhparam
  9013. +         -$(REMOVE) $@ zmhparam
  9014. +         cp xmhparam $@
  9015. +         -@chmod $(PGMPROT) $@
  9016. +         -@ls -l $@
  9017. +         -@echo ""
  9018. + mhparam:    xmhparam
  9019. + xmhparam:    mhparam.o trmsbr.o $(LIBES)
  9020. +         $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES)
  9021. + l-mhparam:;    $(LINT) $(LFLAGS) mhparam.c $(LLIBS) 
  9022.   inst-mhpath:    $(BINDIR)/mhpath
  9023. ***************
  9024. *** 618,620 ****
  9025.           -$(REMOVE) $@ zmhpath
  9026. !         cp xmhpath $@
  9027.           -@chmod $(PGMPROT) $@
  9028. --- 704,706 ----
  9029.           -$(REMOVE) $@ zmhpath
  9030. !         $(CP) xmhpath $@
  9031.           -@chmod $(PGMPROT) $@
  9032. ***************
  9033. *** 638,640 ****
  9034.   @END: POP
  9035. !         cp xmsgchk $@
  9036.           -@chmod $(PGMPROT) $@
  9037. --- 724,726 ----
  9038.   @END: POP
  9039. !         $(CP) xmsgchk $@
  9040.           -@chmod $(PGMPROT) $@
  9041. ***************
  9042. *** 650,652 ****
  9043.   xmsgchk:    msgchk.o $(POPLIB) $(LIBES)
  9044. !         $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) $(LDLIBS)
  9045.   
  9046. --- 736,739 ----
  9047.   xmsgchk:    msgchk.o $(POPLIB) $(LIBES)
  9048. !         $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \
  9049. !                     $(KRBLIB) $(HESLIB) $(LDLIBS)
  9050.   
  9051. ***************
  9052. *** 659,661 ****
  9053.           -$(REMOVE) $@ zmsh
  9054. !         cp xmsh $@
  9055.           -@chmod $(PGMPROT) $@
  9056. --- 746,748 ----
  9057.           -$(REMOVE) $@ zmsh
  9058. !         $(CP) xmsh $@
  9059.           -@chmod $(PGMPROT) $@
  9060. ***************
  9061. *** 682,684 ****
  9062.           -$(REMOVE) $@ zpackf
  9063. !         cp xpackf $@
  9064.           -@chmod $(PGMPROT) $@
  9065. --- 769,771 ----
  9066.           -$(REMOVE) $@ zpackf
  9067. !         $(CP) xpackf $@
  9068.           -@chmod $(PGMPROT) $@
  9069. ***************
  9070. *** 699,701 ****
  9071.           -$(REMOVE) $@ zpick
  9072. !         cp xpick $@
  9073.           -@chmod $(PGMPROT) $@
  9074. --- 786,788 ----
  9075.           -$(REMOVE) $@ zpick
  9076. !         $(CP) xpick $@
  9077.           -@chmod $(PGMPROT) $@
  9078. ***************
  9079. *** 712,713 ****
  9080. --- 799,818 ----
  9081.   
  9082. + inst-popi:    $(BINDIR)/popi
  9083. + $(BINDIR)/popi:    xpopi
  9084. +         -$(REMOVE) $@ zpopi
  9085. +         cp xpopi $@
  9086. +         -@chmod $(PGMPROT) $@
  9087. +         -@ls -l $@
  9088. +         -@echo ""
  9089. + popi:        xpopi
  9090. + xpopi:        popi.o $(POPLIB) trmsbr.o $(LIBES)
  9091. +         $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \
  9092. +             $(LDCURSES)
  9093. + l-popi:;    $(LINT) $(LFLAGS) popi.c $(POPLLIBS) trmsbr.c $(LLIBS)
  9094.   inst-post:    $(ETCDIR)/post
  9095. ***************
  9096. *** 719,721 ****
  9097.   @END: MHMTS
  9098. !         cp xpost $@
  9099.           -@chmod $(PGMPROT) $@
  9100. --- 824,826 ----
  9101.   @END: MHMTS
  9102. !         $(CP) xpost $@
  9103.           -@chmod $(PGMPROT) $@
  9104. ***************
  9105. *** 743,745 ****
  9106.           -$(REMOVE) $@ zprompter
  9107. !         cp xprompter $@
  9108.           -@chmod $(PGMPROT) $@
  9109. --- 848,850 ----
  9110.           -$(REMOVE) $@ zprompter
  9111. !         $(CP) xprompter $@
  9112.           -@chmod $(PGMPROT) $@
  9113. ***************
  9114. *** 760,762 ****
  9115.           -$(REMOVE) $@ zrcvdist
  9116. !         cp xrcvdist $@
  9117.           -@chmod $(PGMPROT) $@
  9118. --- 865,867 ----
  9119.           -$(REMOVE) $@ zrcvdist
  9120. !         $(CP) xrcvdist $@
  9121.           -@chmod $(PGMPROT) $@
  9122. ***************
  9123. *** 777,779 ****
  9124.           -$(REMOVE) $@ zrcvpack
  9125. !         cp xrcvpack $@
  9126.           -@chmod $(PGMPROT) $@
  9127. --- 882,884 ----
  9128.           -$(REMOVE) $@ zrcvpack
  9129. !         $(CP) xrcvpack $@
  9130.           -@chmod $(PGMPROT) $@
  9131. ***************
  9132. *** 794,796 ****
  9133.           -$(REMOVE) $@ zrcvstore
  9134. !         cp xrcvstore $@
  9135.           -@chmod $(PGMPROT) $@
  9136. --- 899,901 ----
  9137.           -$(REMOVE) $@ zrcvstore
  9138. !         $(CP) xrcvstore $@
  9139.           -@chmod $(PGMPROT) $@
  9140. ***************
  9141. *** 811,813 ****
  9142.           -$(REMOVE) $@ zrcvtty
  9143. !         cp xrcvtty $@
  9144.           -@chmod $(PGMPROT) $@
  9145. --- 916,918 ----
  9146.           -$(REMOVE) $@ zrcvtty
  9147. !         $(CP) xrcvtty $@
  9148.           -@chmod $(PGMPROT) $@
  9149. ***************
  9150. *** 822,830 ****
  9151.   
  9152. ! xrcvtty:    rcvtty.o \
  9153. !             scansbr.o trmsbr.o ttyw.o $(LIBES)
  9154. !         $(LD) $(LDFLAGS) -o $@ rcvtty.o \
  9155. !             scansbr.o trmsbr.o ttyw.o $(LDLIBS) $(LDCURSES)
  9156.   
  9157. ! l-rcvtty:;    $(LINT) $(LFLAGS) rcvtty.c \
  9158. !             scansbr.c trmsbr.c ttyw.c $(LLIBS)
  9159.   
  9160. --- 927,944 ----
  9161.   
  9162. ! xrcvtty:    rcvtty.o scansbr.o trmsbr.o \
  9163. ! @BEGIN: TTYD
  9164. !             ttyw.o \
  9165. ! @END: TTYD
  9166. !             $(LIBES)
  9167. !         $(LD) $(LDFLAGS) -o $@ rcvtty.o scansbr.o trmsbr.o \
  9168. ! @BEGIN: TTYD
  9169. !             ttyw.o \
  9170. ! @END: TTYD
  9171. !             $(LDLIBS) $(LDCURSES)
  9172.   
  9173. ! l-rcvtty:;    $(LINT) $(LFLAGS) rcvtty.c scansbr.c trmsbr.c \
  9174. ! @BEGIN: TTYD
  9175. !             ttyw.c \
  9176. ! @END: TTYD
  9177. !             $(LLIBS)
  9178.   
  9179. ***************
  9180. *** 835,837 ****
  9181.           -$(REMOVE) $@ zrefile
  9182. !         cp xrefile $@
  9183.           -@chmod $(PGMPROT) $@
  9184. --- 949,951 ----
  9185.           -$(REMOVE) $@ zrefile
  9186. !         $(CP) xrefile $@
  9187.           -@chmod $(PGMPROT) $@
  9188. ***************
  9189. *** 852,854 ****
  9190.           -$(REMOVE) $@ zrepl
  9191. !         cp xrepl $@
  9192.           -@chmod $(PGMPROT) $@
  9193. --- 966,968 ----
  9194.           -$(REMOVE) $@ zrepl
  9195. !         $(CP) xrepl $@
  9196.           -@chmod $(PGMPROT) $@
  9197. ***************
  9198. *** 859,863 ****
  9199.   
  9200. ! xrepl:        repl.o replsbr.o \
  9201.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
  9202. !         $(LD) $(LDFLAGS) -o $@ repl.o replsbr.o \
  9203.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
  9204. --- 973,977 ----
  9205.   
  9206. ! xrepl:        repl.o replsbr.o whatnowproc.o \
  9207.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
  9208. !         $(LD) $(LDFLAGS) -o $@ repl.o replsbr.o whatnowproc.o \
  9209.               whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
  9210. ***************
  9211. *** 864,866 ****
  9212.   
  9213. ! l-repl:;    $(LINT) $(LFLAGS) repl.c replsbr.c \
  9214.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS) 
  9215. --- 978,980 ----
  9216.   
  9217. ! l-repl:;    $(LINT) $(LFLAGS) repl.c replsbr.c whatnowproc.c \
  9218.               whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS) 
  9219. ***************
  9220. *** 873,875 ****
  9221.           -chmod u-s zrmail
  9222. !         cp xrmail $@
  9223.           -@chmod $(PGMPROT) $@
  9224. --- 987,989 ----
  9225.           -chmod u-s zrmail
  9226. !         $(CP) xrmail $@
  9227.           -@chmod $(PGMPROT) $@
  9228. ***************
  9229. *** 892,894 ****
  9230.           -$(REMOVE) $@ zrmf
  9231. !         cp xrmf $@
  9232.           -@chmod $(PGMPROT) $@
  9233. --- 1006,1008 ----
  9234.           -$(REMOVE) $@ zrmf
  9235. !         $(CP) xrmf $@
  9236.           -@chmod $(PGMPROT) $@
  9237. ***************
  9238. *** 909,911 ****
  9239.           -$(REMOVE) $@ zrmm
  9240. !         cp xrmm $@
  9241.           -@chmod $(PGMPROT) $@
  9242. --- 1023,1025 ----
  9243.           -$(REMOVE) $@ zrmm
  9244. !         $(CP) xrmm $@
  9245.           -@chmod $(PGMPROT) $@
  9246. ***************
  9247. *** 926,928 ****
  9248.           -$(REMOVE) $@ zscan
  9249. !         cp xscan $@
  9250.           -@chmod $(PGMPROT) $@
  9251. --- 1040,1042 ----
  9252.           -$(REMOVE) $@ zscan
  9253. !         $(CP) xscan $@
  9254.           -@chmod $(PGMPROT) $@
  9255. ***************
  9256. *** 946,948 ****
  9257.           -$(REMOVE) $@ zsend
  9258. !         cp xsend $@
  9259.           -@chmod $(PGMPROT) $@
  9260. --- 1060,1062 ----
  9261.           -$(REMOVE) $@ zsend
  9262. !         $(CP) xsend $@
  9263.           -@chmod $(PGMPROT) $@
  9264. ***************
  9265. *** 968,970 ****
  9266.           -$(REMOVE) $@ zshow
  9267. !         cp xshow $@
  9268.           -@chmod $(PGMPROT) $@
  9269. --- 1082,1084 ----
  9270.           -$(REMOVE) $@ zshow
  9271. !         $(CP) xshow $@
  9272.           -@chmod $(PGMPROT) $@
  9273. ***************
  9274. *** 997,999 ****
  9275.   @END: SENDMTS
  9276. !         cp xsbboards $@
  9277.           -chmod $(PGMPROT) $@
  9278. --- 1111,1113 ----
  9279.   @END: SENDMTS
  9280. !         $(CP) xsbboards $@
  9281.           -chmod $(PGMPROT) $@
  9282. ***************
  9283. *** 1018,1020 ****
  9284.           -$(REMOVE) $@ zslocal
  9285. !         cp xslocal $@
  9286.           -chmod $(PGMPROT) $@
  9287. --- 1132,1134 ----
  9288.           -$(REMOVE) $@ zslocal
  9289. !         $(CP) xslocal $@
  9290.           -chmod $(PGMPROT) $@
  9291. ***************
  9292. *** 1035,1037 ****
  9293.           -$(REMOVE) $@ zsortm
  9294. !         cp xsortm $@
  9295.           -@chmod $(PGMPROT) $@
  9296. --- 1149,1151 ----
  9297.           -$(REMOVE) $@ zsortm
  9298. !         $(CP) xsortm $@
  9299.           -@chmod $(PGMPROT) $@
  9300. ***************
  9301. *** 1053,1055 ****
  9302.           -chmod u-s zspop
  9303. !         cp xspop $@
  9304.           -chmod $(PGMPROT) $@
  9305. --- 1167,1169 ----
  9306.           -chmod u-s zspop
  9307. !         $(CP) xspop $@
  9308.           -chmod $(PGMPROT) $@
  9309. ***************
  9310. *** 1076,1078 ****
  9311.           -$(REMOVE) $@ zspost
  9312. !         cp xspost $@
  9313.           -@chmod $(PGMPROT) $@
  9314. --- 1190,1192 ----
  9315.           -$(REMOVE) $@ zspost
  9316. !         $(CP) xspost $@
  9317.           -@chmod $(PGMPROT) $@
  9318. ***************
  9319. *** 1090,1091 ****
  9320. --- 1204,1206 ----
  9321.   
  9322. + @BEGIN: SMTP
  9323.   inst-sendmail:    $(ETCDIR)/sendmail
  9324. ***************
  9325. *** 1106,1109 ****
  9326.   l-sendmail:;        $(LINT) $(LFLAGS) sendmail.c $(LLIBS)
  9327.   
  9328.   inst-tma:    $(BINDIR)/tma
  9329. --- 1221,1224 ----
  9330.   l-sendmail:;        $(LINT) $(LFLAGS) sendmail.c $(LLIBS)
  9331. + @END: SMTP
  9332.   
  9333.   inst-tma:    $(BINDIR)/tma
  9334. ***************
  9335. *** 1112,1114 ****
  9336.           -$(REMOVE) $@ ztma
  9337. !         cp xtma $@
  9338.           -@chmod $(PGMPROT) $@
  9339. --- 1227,1229 ----
  9340.           -$(REMOVE) $@ ztma
  9341. !         $(CP) xtma $@
  9342.           -@chmod $(PGMPROT) $@
  9343. ***************
  9344. *** 1129,1131 ****
  9345.           -$(REMOVE) $@ zumhook
  9346. !         cp xumhook $@
  9347.           -@chmod $(PGMPROT) $@
  9348. --- 1244,1246 ----
  9349.           -$(REMOVE) $@ zumhook
  9350. !         $(CP) xumhook $@
  9351.           -@chmod $(PGMPROT) $@
  9352. ***************
  9353. *** 1146,1148 ****
  9354.           -$(REMOVE) $@ zvmh
  9355. !         cp xvmh $@
  9356.           -@chmod $(PGMPROT) $@
  9357. --- 1261,1263 ----
  9358.           -$(REMOVE) $@ zvmh
  9359. !         $(CP) xvmh $@
  9360.           -@chmod $(PGMPROT) $@
  9361. ***************
  9362. *** 1154,1156 ****
  9363.   xvmh:       vmh.o vmhsbr.o $(LIBES) 
  9364. !         $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDLIBS) $(LDCURSES)
  9365.   
  9366. --- 1269,1271 ----
  9367.   xvmh:       vmh.o vmhsbr.o $(LIBES) 
  9368. !         $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS)
  9369.   
  9370. ***************
  9371. *** 1167,1169 ****
  9372.           -$(REMOVE) $@ zwhatnow
  9373. !         cp xwhatnow $@
  9374.           -@chmod $(PGMPROT) $@
  9375. --- 1282,1284 ----
  9376.           -$(REMOVE) $@ zwhatnow
  9377. !         $(CP) xwhatnow $@
  9378.           -@chmod $(PGMPROT) $@
  9379. ***************
  9380. *** 1187,1189 ****
  9381.           -$(REMOVE) $@ zwhom
  9382. !         cp xwhom $@
  9383.           -@chmod $(PGMPROT) $@
  9384. --- 1302,1304 ----
  9385.           -$(REMOVE) $@ zwhom
  9386. !         $(CP) xwhom $@
  9387.           -@chmod $(PGMPROT) $@
  9388. ***************
  9389. *** 1204,1206 ****
  9390.           -$(REMOVE) $@ zwmh
  9391. !         cp xwmh $@
  9392.           -@chmod $(PGMPROT) $@
  9393. --- 1319,1321 ----
  9394.           -$(REMOVE) $@ zwmh
  9395. !         $(CP) xwmh $@
  9396.           -@chmod $(PGMPROT) $@
  9397. ***************
  9398. *** 1342,1344 ****
  9399. --- 1457,1461 ----
  9400.   #bbc.o: /usr/include/stdio.h
  9401. + @BEGIN: BPOP
  9402.   bbc.o: ../zotnet/mts.h
  9403. + @END: BPOP
  9404.   #bbc.o: /usr/include/errno.h
  9405. ***************
  9406. *** 1440,1441 ****
  9407. --- 1557,1569 ----
  9408.   #fmtdump.o: /usr/include/stdio.h
  9409. + ftpsbr.o: ftpsbr.c
  9410. + ftpsbr.o: ../h/mh.h
  9411. + ftpsbr.o: ../h/mhn.h
  9412. + #ftpsbr.o: /usr/include/ctype.h
  9413. + #ftpsbr.o: /usr/include/stdio.h
  9414. + #ftpsbr.o: /usr/include/arpa/ftp.h
  9415. + #ftpsbr.o: /usr/include/varargs.h
  9416. + #ftpsbr.o: /usr/include/sys/types.h
  9417. + #ftpsbr.o: /usr/include/sys/socket.h
  9418. + #ftpsbr.o: /usr/include/netinet/in.h
  9419. + #ftpsbr.o: /usr/include/netdb.h
  9420.   inc.o: inc.c
  9421. ***************
  9422. *** 1481,1482 ****
  9423. --- 1609,1624 ----
  9424.   #mhmail.o: /usr/include/signal.h
  9425. + mhn.o: mhn.c
  9426. + mhn.o: ../h/mh.h
  9427. + mhn.o: ../h/mhn.h
  9428. + #mhn.o: /usr/include/ctype.h
  9429. + #mhn.o: /usr/include/errno.h
  9430. + #mhn.o: /usr/include/signal.h
  9431. + #mhn.o: /usr/include/stdio.h
  9432. + #mhn.o: /usr/include/sys/types.h
  9433. + #mhn.o: /usr/include/sys/stat.h
  9434. + #mhn.o: /usr/include/sys/wait.h
  9435. + mhparam.o: mhparam.c
  9436. + mhparam.o: ../h/mh.h
  9437. + mhparam.o: ../h/strings.h
  9438. + #mhparam.o: /usr/include/stdio.h
  9439.   mhpath.o: mhpath.c
  9440. ***************
  9441. *** 1523,1524 ****
  9442. --- 1665,1669 ----
  9443.   mshcmds.o: ../h/mshsbr.h
  9444. + @BEGIN: MIME
  9445. + mshcmds.o: ../h/mhn.h
  9446. + @END: MIME
  9447.   packf.o: packf.c
  9448. ***************
  9449. *** 1539,1540 ****
  9450. --- 1684,1704 ----
  9451.   #popsbr.o: /usr/include/signal.h
  9452. + pshsbr.o: popsbr.c
  9453. + pshsbr.o: ../h/strings.h
  9454. + pshsbr.o: ../h/nntp.h
  9455. + #pshsbr.o: /usr/include/stdio.h
  9456. + #pshsbr.o: /usr/include/signal.h
  9457. + popi.o: popi.c
  9458. + popi.o: ../h/mh.h
  9459. + popi.o: ../h/strings.h
  9460. + popi.o: ../h/formatsbr.h
  9461. + popi.o: ../h/scansbr.h
  9462. + popi.o: ../zotnet/mts.h
  9463. + #popi.o: /usr/include/errno.h
  9464. + #popi.o: /usr/include/sys/errno.h
  9465. + #popi.o: /usr/include/stdio.h
  9466. + #popi.o: /usr/include/sys/types.h
  9467. + #popi.o: /usr/include/sys/stdtypes.h
  9468. + #popi.o: /usr/include/sys/sysmacros.h
  9469. + #popi.o: /usr/include/sys/stat.h
  9470. + #popi.o: /usr/include/sys/types.h
  9471.   post.o: post.c
  9472. ***************
  9473. *** 1660,1661 ****
  9474. --- 1824,1848 ----
  9475.   #send.o: /usr/include/sys/stat.h
  9476. + @BEGIN: SMTP
  9477. + sendmail.o: sendmail.c
  9478. + sendmail.o: ../h/mh.h
  9479. + sendmail.o: ../h/strings.h
  9480. + sendmail.o: ../h/addrsbr.h
  9481. + sendmail.o: ../h/aliasbr.h
  9482. + sendmail.o: ../h/dropsbr.h
  9483. + sendmail.o: ../zotnet/tws.h
  9484. + sendmail.o: ../zotnet/mts.h
  9485. + #sendmail.o: /usr/include/ctype.h
  9486. + #sendmail.o: /usr/include/errno.h
  9487. + #sendmail.o: /usr/include/sys/errno.h
  9488. + #sendmail.o: /usr/include/setjmp.h
  9489. + #sendmail.o: /usr/include/machine/setjmp.h
  9490. + #sendmail.o: /usr/include/stdio.h
  9491. + #sendmail.o: /usr/include/sys/types.h
  9492. + #sendmail.o: /usr/include/sys/stdtypes.h
  9493. + #sendmail.o: /usr/include/sys/sysmacros.h
  9494. + #sendmail.o: /usr/include/signal.h
  9495. + #sendmail.o: /usr/include/sys/signal.h
  9496. + #sendmail.o: /usr/include/vm/faultcode.h
  9497. + #sendmail.o: /usr/include/sys/stdtypes.h
  9498. + @END: SMTP
  9499.   sendsbr.o: sendsbr.c
  9500. ***************
  9501. *** 1667,1668 ****
  9502. --- 1854,1858 ----
  9503.   #sendsbr.o: /usr/include/sys/stat.h
  9504. + @BEGIN: MIME
  9505. + sendsbr.o: ../h/mhn.h
  9506. + @END: MIME
  9507.   show.o: show.c
  9508. ***************
  9509. *** 1670,1671 ****
  9510. --- 1860,1864 ----
  9511.   #show.o: /usr/include/stdio.h
  9512. + @BEGIN: MIME
  9513. + show.o: ../h/mhn.h
  9514. + @END: MIME
  9515.   slocal.o: slocal.c
  9516. ***************
  9517. *** 1723,1724 ****
  9518. --- 1916,1918 ----
  9519.   #trmsbr.o: /usr/include/sys/ioctl.h
  9520. + @BEGIN: TTYD
  9521.   ttym.o: ttym.c
  9522. ***************
  9523. *** 1738,1739 ****
  9524. --- 1932,1934 ----
  9525.   ttyw.o: ttym.c
  9526. + @END: TTYD
  9527.   umhook.o: umhook.c
  9528. ***************
  9529. *** 1768,1769 ****
  9530. --- 1963,1968 ----
  9531.   whatnow.o: whatnow.c
  9532. + whatnowproc.o: whatnowproc.c
  9533. + whatnowproc.o: ../h/mh.h
  9534. + whatnowproc.o: ../h/strings.h
  9535. + #whatnowproc.o: /usr/include/stdio.h
  9536.   whatnowsbr.o: whatnowsbr.c
  9537. *** ../mh-6.7.2/conf/makefiles/zotnet/bboards    Wed Jan 29 15:06:46 1992
  9538. --- conf/makefiles/zotnet/bboards    Thu Nov 12 15:22:54 1992
  9539. ***************
  9540. *** 4,6 ****
  9541.   #    @(MHWARNING)
  9542. ! # @(#)$Id: bboards,v 1.6 1990/04/05 15:16:32 sources Exp $
  9543.   ##############################################################################
  9544. --- 4,6 ----
  9545.   #    @(MHWARNING)
  9546. ! # @(#)$Id: bboards,v 1.7 1992/11/12 23:22:48 jromine Exp $
  9547.   ##############################################################################
  9548. ***************
  9549. *** 27,29 ****
  9550.   
  9551. ! all:        getbbent
  9552.   
  9553. --- 27,29 ----
  9554.   
  9555. ! all:        getbbent.o
  9556.   
  9557. *** ../mh-6.7.2/conf/makefiles/zotnet/mts    Wed Jan 29 15:10:19 1992
  9558. --- conf/makefiles/zotnet/mts    Thu Feb  6 09:29:08 1992
  9559. ***************
  9560. *** 4,6 ****
  9561.   #    @(MHWARNING)
  9562. ! # @(#)$Id: mts,v 1.7 1992/01/29 23:10:03 jromine Exp $
  9563.   ##############################################################################
  9564. --- 4,6 ----
  9565.   #    @(MHWARNING)
  9566. ! # @(#)$Id: mts,v 1.8 1992/02/06 17:29:00 jromine Exp $
  9567.   ##############################################################################
  9568. ***************
  9569. *** 32,33 ****
  9570. --- 32,37 ----
  9571.   
  9572. + OFILES    =    mts.o lock.o client.o
  9573. + LFILES    =    l-mts l-lock l-client
  9574. + IFILES    =    inst-mtstailor
  9575.   .c:;            echo $@
  9576. ***************
  9577. *** 38,42 ****
  9578.   
  9579. ! all:        mts lock client
  9580.   
  9581. ! lint:        l-mts l-lock l-client
  9582.   
  9583. --- 42,46 ----
  9584.   
  9585. ! all:        $(OFILES)
  9586.   
  9587. ! lint:        $(LFILES)
  9588.   
  9589. ***************
  9590. *** 44,46 ****
  9591.   
  9592. ! inst-all:    inst-mtstailor
  9593.   
  9594. --- 48,50 ----
  9595.   
  9596. ! inst-all:    $(IFILES)
  9597.   
  9598. *** ../mh-6.7.2/conf/makefiles/zotnet/tws    Wed Jan 29 16:31:24 1992
  9599. --- conf/makefiles/zotnet/tws    Fri Nov 20 09:26:04 1992
  9600. ***************
  9601. *** 4,6 ****
  9602.   #    @(MHWARNING)
  9603. ! # @(#)$Id: tws,v 1.10 1992/01/30 00:31:18 jromine Exp $
  9604.   ##############################################################################
  9605. --- 4,6 ----
  9606.   #    @(MHWARNING)
  9607. ! # @(#)$Id: tws,v 1.15 1992/11/18 16:54:16 jromine Exp $
  9608.   ##############################################################################
  9609. ***************
  9610. *** 15,16 ****
  9611. --- 15,17 ----
  9612.   CC      =    @(MHCOMPILER)
  9613. + LN    =    @(LN)
  9614.   LEX    =    @(LEX)
  9615. ***************
  9616. *** 29,30 ****
  9617. --- 30,34 ----
  9618.   
  9619. + OFILES    =    dtimep.o lexstring.o dtime.o
  9620. + LFILES    =     l-dtimep l-dtime l-date
  9621.   .c:;        echo $@
  9622. ***************
  9623. *** 35,39 ****
  9624.   
  9625. ! all:        dtimep dtime date
  9626.   
  9627. ! lint:        l-dtimep l-dtime l-date
  9628.   
  9629. --- 39,43 ----
  9630.   
  9631. ! all:        $(OFILES) date
  9632.   
  9633. ! lint:        $(LFILES)
  9634.   
  9635. ***************
  9636. *** 64,66 ****
  9637.   dtimep:        dtimep.o lexstring.o
  9638. !  
  9639.   dtimep.o:    dtimep.c
  9640. --- 68,70 ----
  9641.   dtimep:        dtimep.o lexstring.o
  9642.   dtimep.o:    dtimep.c
  9643. ***************
  9644. *** 77,85 ****
  9645.   ######################################################################
  9646. - lex:        zap-dtime dtimep.c
  9647. - zap-dtime:;    rm -f dtimep.c
  9648. - ######################################################################
  9649.   # dtime
  9650. --- 81,82 ----
  9651. ***************
  9652. *** 96,97 ****
  9653. --- 93,97 ----
  9654.   
  9655. + tws.h:        ../tws.h
  9656. +         rm -f $@
  9657. +         $(LN) ../tws.h $@
  9658.   
  9659. ***************
  9660. *** 103,105 ****
  9661.   clean:        unclean
  9662. !         -rm -f *.o date
  9663.   
  9664. --- 103,105 ----
  9665.   clean:        unclean
  9666. !         -rm -f dtimep.c *.o date
  9667.   
  9668. *** ../mh-6.7.2/conf/makefiles/zotnetM    Thu Apr  5 16:05:22 1990
  9669. --- conf/makefiles/zotnetM    Thu Oct 29 08:25:26 1992
  9670. ***************
  9671. *** 4,6 ****
  9672.   #    @(MHWARNING)
  9673. ! # @(#)$Id: zotnetM,v 2.5 90/04/05 15:18:23 sources Exp $
  9674.   ##############################################################################
  9675. --- 4,6 ----
  9676.   #    @(MHWARNING)
  9677. ! # @(#)$Id: zotnetM,v 2.7 1992/10/29 16:25:20 jromine Exp $
  9678.   ##############################################################################
  9679. *** ../mh-6.7.2/conf/mh-gen.8    Thu Jan 30 08:41:44 1992
  9680. --- conf/mh-gen.8    Mon Dec 14 09:19:25 1992
  9681. ***************
  9682. *** 1,2 ****
  9683. ! .\" @(#)$Id: mh-gen.8,v 2.55 1992/01/30 16:41:35 jromine Exp $
  9684.   .\" uneven inter-word spacing (nroff line adjusting) hampers readability
  9685. --- 1,2 ----
  9686. ! .\" @(#)$Id: mh-gen.8,v 2.105 1992/12/14 17:19:19 jromine Exp $
  9687.   .\" uneven inter-word spacing (nroff line adjusting) hampers readability
  9688. ***************
  9689. *** 3,5 ****
  9690.   .if n .na
  9691. ! .TH MH-GEN 8 MH [mh.6]
  9692.   .SH NAME
  9693. --- 3,5 ----
  9694.   .if n .na
  9695. ! .TH MH-GEN 8 MH.6.8 [mh.6]
  9696.   .SH NAME
  9697. ***************
  9698. *** 11,13 ****
  9699.   also want to familiarize yourself with the \fIMH\fP Administrator's
  9700. ! Guide before you install \fIMH\fP.
  9701.   .SH DISCLAIMER
  9702. --- 11,14 ----
  9703.   also want to familiarize yourself with the \fIMH\fP Administrator's
  9704. ! Guide before you install \fIMH\fP.  A copy can be found in the
  9705. ! file \fBdoc/ADMIN.doc\fP is the \fIMH\fP sources.
  9706.   .SH DISCLAIMER
  9707. ***************
  9708. *** 66,70 ****
  9709.   1.  If you can FTP to the ARPA Internet, use anonymous FTP to
  9710. ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.7.tar.Z.
  9711.   This is a tar image after being run through the compress program
  9712. ! (approximately 1.5MB).  There should also be a \fBREADME\fR file in
  9713.   that directory which tells what the current release of \fIMH\fP
  9714. --- 67,71 ----
  9715.   1.  If you can FTP to the ARPA Internet, use anonymous FTP to
  9716. ! ftp.ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z.
  9717.   This is a tar image after being run through the compress program
  9718. ! (approximately 1.8MB).  There should also be a \fBREADME\fR file in
  9719.   that directory which tells what the current release of \fIMH\fP
  9720. ***************
  9721. *** 73,75 ****
  9722.   This tar file is also available on louie.udel.edu 
  9723. ! [128.175.1.3] in portal/mh-6.7.tar.Z.  You may also find MH on
  9724.   various other hosts; to make sure you get the latest version and
  9725. --- 74,76 ----
  9726.   This tar file is also available on louie.udel.edu 
  9727. ! [128.175.1.3] in portal/mh-6.8.tar.Z.  You may also find MH on
  9728.   various other hosts; to make sure you get the latest version and
  9729. ***************
  9730. *** 76,78 ****
  9731.   don't waste your time re-fixing bugs, it's best to get it from
  9732. ! either ics.uci.edu or louie.udel.edu.
  9733.   .PP
  9734. --- 77,79 ----
  9735.   don't waste your time re-fixing bugs, it's best to get it from
  9736. ! either ftp.ics.uci.edu or louie.udel.edu.
  9737.   .PP
  9738. ***************
  9739. *** 92,100 ****
  9740.   .RS 1i
  9741. ! Computing Support Group 
  9742. ! Attn: MH distribution
  9743. ! Department of Information and Computer Science
  9744. ! University of California, Irvine
  9745. ! Irvine, CA  92717
  9746.   
  9747. ! 714/856-7554
  9748.   .fi
  9749. --- 93,100 ----
  9750.   .RS 1i
  9751. ! Univeristy of California at Irvine
  9752. ! Office of Academic Computing
  9753. ! 360 Computer Science
  9754. ! Irvine, CA  92717  USA
  9755.   
  9756. ! +1 714 856 5153
  9757.   .fi
  9758. ***************
  9759. *** 115,120 ****
  9760.   .PP
  9761. ! Become the super-user and create a new directory under /usr/src/local/
  9762. ! (or whatever) for the \fIMH\fR area.
  9763. ! Traditionally, the directory's name should be mh/.
  9764. ! The distribution tape contains the hierarchy for the mh.6/ directory.
  9765.   Bring the sources on-line:
  9766. --- 115,119 ----
  9767.   .PP
  9768. ! Become the super-user and cd to /usr/src/local/
  9769. ! (or whatever you keep your local sources).
  9770. ! The distribution tape contains the hierarchy for the mh.6-8/ directory.
  9771.   Bring the sources on-line:
  9772. ***************
  9773. *** 122,126 ****
  9774.   .nf
  9775. ! # mkdir /usr/src/local/mh
  9776. ! % cd /usr/src/local/mh
  9777.   % tar xv
  9778.   .fi
  9779. --- 121,125 ----
  9780.   .nf
  9781. ! # cd /usr/src/local
  9782.   % tar xv
  9783. + % cd mh-6.8
  9784.   .fi
  9785. ***************
  9786. *** 139,140 ****
  9787. --- 138,140 ----
  9788.   produce customized files.
  9789. + .sp
  9790.   For examples of various configurations,
  9791. ***************
  9792. *** 142,146 ****
  9793.   The file \fBMH\fR provided in \fBconf/\fR is a reasonable default.
  9794.   .PP
  9795. ! Here are the \fIMH\fP configuration options available:
  9796.   .in +.5i
  9797.   .ti -.5i
  9798. --- 142,162 ----
  9799.   The file \fBMH\fR provided in \fBconf/\fR is a reasonable default.
  9800. + Lines beginning with `#' are comments, and are not otherwise interpreted.
  9801.   .PP
  9802. ! Here are the \fIMH\fP configuration directives available.  Be sure
  9803. ! to read through this list completely before attempting to decide
  9804. ! what directives are appropriate for your system.  
  9805. ! .sp
  9806. ! More information on some of these options is available in the
  9807. ! the \fIAdministrator's Guide\fR.  If you do not have a printed
  9808. ! copy, you should configure your system with the default
  9809. ! configuration file, \fBMH\fP, then generate and print a copy
  9810. ! of the guide (as described below).
  9811.   .in +.5i
  9812. + .de Uh
  9813. + .ti -.75i
  9814. + .B "\\$1"
  9815. + .ne 4
  9816. + ..
  9817. + .Uh "Installation paths"
  9818.   .ti -.5i
  9819. ***************
  9820. *** 151,159 ****
  9821.   .ti -.5i
  9822. - debug: off
  9823. - .br
  9824. - Support for debug mode of \fIMH\fR.
  9825. - Don't use this unless you know what you're doing,
  9826. - which isn't likely if you're reading this document!
  9827. - .ti -.5i
  9828.   etc: /usr/local/lib/mh
  9829. --- 167,168 ----
  9830. ***************
  9831. *** 172,179 ****
  9832.   .ti -.5i
  9833. - mailgroup: off
  9834. - .br
  9835. - If set, \fIinc\fR is made set-group-id to this group name.
  9836. - Some SYS5 systems want this to be set to \*(lqmail\*(rq.
  9837. - .ti -.5i
  9838.   mandir: /usr/man
  9839. --- 181,182 ----
  9840. ***************
  9841. *** 200,202 ****
  9842.   .br
  9843. ! The location of the \fIchown\fR\0(8) on your system.
  9844.   If \fIchown\fR is in your search path,
  9845. --- 203,205 ----
  9846.   .br
  9847. ! The location of the \fIchown\fR\|(8) on your system.
  9848.   If \fIchown\fR is in your search path,
  9849. ***************
  9850. *** 207,211 ****
  9851.   .ti -.5i
  9852. ! editor: prompter
  9853.   .br
  9854. ! The default editor for \fIMH\fR.
  9855.   
  9856. --- 210,215 ----
  9857.   .ti -.5i
  9858. ! cp: cp
  9859.   .br
  9860. ! The command to copy files when installing, if not \*(lqcp\*(rq.
  9861. ! (Some sites use \*(lqcp\0\-p\*(rq.)
  9862.   
  9863. ***************
  9864. *** 212,213 ****
  9865. --- 216,225 ----
  9866.   .ti -.5i
  9867. + ln: ln
  9868. + .br
  9869. + The command to link files together in the source tree, if not \*(lqln\*(rq.
  9870. + If you're using something like \fBlndir\fP to keep
  9871. + your compile tree separate from your source tree,
  9872. + set this to \*(lqln\0\-s\*(rq or \*(lqcp\*(rq.
  9873. + .ti -.5i
  9874.   remove: mv \-f
  9875. ***************
  9876. *** 214,218 ****
  9877.   .br
  9878. ! How \fIMH\fR should backup existing files when installing a new file.
  9879.   
  9880.   .ti -.5i
  9881.   mts: sendmail
  9882. --- 226,306 ----
  9883.   .br
  9884. ! How \fIMH\fR should make backup copies
  9885. ! of existing files when installing new files.
  9886. ! To simply remove the old files, use \*(lqrm\0\-f\*(rq.
  9887.   
  9888. + .Uh "Compiler/loader"
  9889.   .ti -.5i
  9890. + cc: cc
  9891. + .br
  9892. + The name of your C compiler, if not \*(lqcc\*(rq.
  9893. + .ti -.5i
  9894. + ccoptions: \-O
  9895. + .br
  9896. + Options given directly to \fIcc\fR\|(1).
  9897. + The most common is \*(lq\-M\*(rq if you're running \fIMH\fR on an ALTOS.
  9898. + This defaults to \*(lq\-O\*(rq.  If you define this and want to 
  9899. + keep \*(lq\-O\*(rq, be sure to include it explicitly.
  9900. + If you're using the \fIGNU\fP C compiler, it should
  9901. + include `\-traditional'.  See \*(lqoptions:\*(rq for `\-D' options.
  9902. + .ti -.5i
  9903. + curses: \-lcurses\0\-ltermlib
  9904. + .br
  9905. + This should be the loader option required to load the \fItermcap\fR\|(3)
  9906. + and \fIcurses\fR\|(3) libraries on your system.
  9907. + On SYS5 systems, it probably should be just \*(lq\-lcurses\*(rq.
  9908. + Some sites have reported that both \*(lq\-lcurses\*(rq and
  9909. + \*(lq\-ltermlib\*(rq are necessary.
  9910. + .ti -.5i
  9911. + ldoptions: \-s
  9912. + .br
  9913. + Options given directly to \fIld\fR\|(1) (via \fIcc\fR\|) at the beginning
  9914. + of the command line.
  9915. + Useful for machines which require arguments to tell \fIld\fR to increase the
  9916. + stack space (e.g. the Gould, which uses \*(lq\-m\08\*(rq).
  9917. + Usually, \*(lq\-s\*(rq is a good choice in any event.
  9918. + .ti -.5i
  9919. + ldoptlibs:
  9920. + .br
  9921. + Options given directly to \fIld\fR\|(1) (via \fIcc\fR\|) at the end of the
  9922. + command line.
  9923. + The two most common are:
  9924. + \*(lq\-ldbm\*(rq if you're running MMDF with the \fIdbm\fR package;
  9925. + and, \*(lq\-lndir\*(rq if you are generating \fIMH\fR on a system
  9926. + which does not load the new directory access mechanism by default
  9927. + (e.g., 4.1BSD, SYS5).
  9928. + If you don't have \fIlibndir\fR on your system,
  9929. + the sources are in \fBmiscellany/libndir/\fR.
  9930. + .ti -.5i
  9931. + lex: lex \-nt
  9932. + .br
  9933. + Alternative version of \fIlex\fR.  Used in \fBzotnet/tws/\fR.
  9934. + .ti -.5i
  9935. + oldload: off
  9936. + .br
  9937. + This controls how \fIMH\fP will try to process library object files to
  9938. + eliminate local symbols.
  9939. + Support for the ALTOS loader if \*(lqon\*(rq.
  9940. + Support for loaders not handling `\-x\0\-r' correctly if \*(lqnone\*(rq.
  9941. + .ti -.5i
  9942. + ranlib: on
  9943. + .br
  9944. + Support for systems with \fIranlib\fR\|(1).
  9945. + For SYSTEM 5 systems,
  9946. + this should be \*(lqoff\*(rq which tells \fIMH\fR to use \fIlorder\fR and
  9947. + \fItsort\fR instead.
  9948. + Some SYSTEM 5 sites reported that running this isn't always sufficient.
  9949. + If this is the case,
  9950. + then you should edit \fBconf/makefiles/uip\fR to include
  9951. + \fB\&../sbr/libmh.a\fR and \fB../zotnet/libzot.a\fR twice in the LIBES
  9952. + variable.
  9953. + .Uh "Message Transport System"
  9954. + .ti -.5i
  9955.   mts: sendmail
  9956. ***************
  9957. *** 223,224 ****
  9958. --- 311,313 ----
  9959.   \*(lqsendmail\*(rq to have \fISendMail\fR as the transport system,
  9960. + \*(lqzmailer\*(rq to have \fIZMAILER\fP as the transport system,
  9961.   or, \*(lqmh\*(rq to have \fIMH\fR as the transport system.
  9962. ***************
  9963. *** 235,237 ****
  9964.   Guide\fR; be sure to set \*(lqservers:\*(rq as described in
  9965. ! \fImh\-tailor\fR\0(8) if you use this option.
  9966.   
  9967. --- 324,326 ----
  9968.   Guide\fR; be sure to set \*(lqservers:\*(rq as described in
  9969. ! \fImh\-tailor\fR\|(8) if you use this option.
  9970.   
  9971. ***************
  9972. *** 238,239 ****
  9973. --- 327,337 ----
  9974.   .ti -.5i
  9975. + mf: off
  9976. + .br
  9977. + Support for mail filtering on those systems in which the message transport
  9978. + system isn't integrated with \fIUUCP\fR 
  9979. + This option is strictly for an \fIMH\fR system using either \fIMMDF\-I\fR
  9980. + as its transport system or one using \*(lqstand\-alone delivery\*(rq.
  9981. + .Uh "UCI BBoards Facility"
  9982. + .ti -.5i
  9983.   bboards: off
  9984. ***************
  9985. *** 246,250 ****
  9986.   via the NNTP.
  9987. ! If \*(lqpop\*(rq (formerly \*(lqpopbboards:\ on\*(rq),
  9988.   include support for the UCI BBoards facility via the POP3 service;
  9989. ! this setting requires \*(lqpop:\ on\*(rq.
  9990.   
  9991. --- 344,348 ----
  9992.   via the NNTP.
  9993. ! If \*(lqpop\*(rq (formerly \*(lqpopbboards:\0on\*(rq),
  9994.   include support for the UCI BBoards facility via the POP3 service;
  9995. ! this setting requires \*(lqpop:\0on\*(rq.
  9996.   
  9997. ***************
  9998. *** 273,283 ****
  9999.   
  10000.   .ti -.5i
  10001. - mf: off
  10002. - .br
  10003. - Support for mail filtering on those systems in which the message transport
  10004. - system isn't integrated with \fIUUCP\fR 
  10005. - This option is strictly for an \fIMH\fR system using either \fIMMDF\-I\fR
  10006. - as its transport system or one using \*(lqstand\-alone delivery\*(rq.
  10007. - .ti -.5i
  10008.   pop: off
  10009. --- 371,374 ----
  10010.   
  10011. + .Uh "Post Office Protocol"
  10012.   .ti -.5i
  10013.   pop: off
  10014. ***************
  10015. *** 290,305 ****
  10016.   (It doesn't hurt to enable this option regardless of whether or not
  10017. ! you intend to use POP.)
  10018. ! If POP is enabled, there are three additional options which are of interest:
  10019. ! \*(lqRPOP\*(rq, \*(lqDPOP\*(rq and \*(lqPOP2\*(rq.
  10020. ! The first indicates that support for the UNIX variant of POP,
  10021. ! RPOP, which uses privileged sockets for authentication be enabled.
  10022. ! This peacefully co\-exists with the standard POP.
  10023. ! The \*(lqDPOP\*(rq option indicates that POP subscribers do not have
  10024. ! entries in the \fIpasswd\fR\0(5) file,
  10025. ! and instead have their own separate database (another major win).
  10026. ! The \*(lqPOP2\*(rq option indicates that the \fIMH\fP POP daemon should
  10027. ! speak the older POP2 protocol in addition to the \fIMH\fP POP3 protocol \-
  10028. ! a major win.
  10029. ! All of these options can be enabled via an \*(lqoptions\*(rq directive in the
  10030. ! \fIMH\fR configuration file.
  10031.   
  10032. --- 381,384 ----
  10033.   (It doesn't hurt to enable this option regardless of whether or not
  10034. ! you intend to use POP.)  See also \*(lqbboards: pop\*(rq to enable
  10035. ! reading bboards with the POP.
  10036.   
  10037. ***************
  10038. *** 306,307 ****
  10039. --- 385,392 ----
  10040.   .ti -.5i
  10041. + popdir: /usr/etc
  10042. + .br
  10043. + The directory where the POP daemon (\fBpopd\fP) will be installed.
  10044. + .ne 5
  10045. + .ti -.5i
  10046.   options:
  10047. ***************
  10048. *** 308,324 ****
  10049.   .br
  10050. ! \&`\-D' options to \fIcc\fR\0(1).  If you don't know what an
  10051. ! option does, it probably doesn't apply to you.
  10052.   
  10053.   .in +.5i
  10054.   .ti -.5i
  10055. ! ALTOS
  10056.   .br
  10057. ! Use on XENIX/v7 systems.
  10058. ! Also, be sure to use \*(lqoptions V7\*(rq.
  10059.   
  10060.   .ti -.5i
  10061. ! ATHENA
  10062.   .br
  10063. ! Makes \fIrepl\fR `\-nocc\ all' the default instead of `\-cc\ all'.
  10064. ! You may want to enable this if you're using \fIxmh\fR.
  10065.   
  10066. --- 393,576 ----
  10067.   .br
  10068. ! \&`\-D' options to \fIcc\fR\|(1).
  10069. ! .sp
  10070. ! .in +.25i
  10071. ! .ti -.5i
  10072. ! APOP='\*(lq/etc/pop.auth\*(rq'
  10073. ! .br
  10074. ! This option indicates that the POP daemon will
  10075. ! support the non-standard \fBAPOP\fP command,
  10076. ! and specifies the name of \fBAPOP\fP authorization database.
  10077. ! The \fBAPOP\fP
  10078. ! command provides a challenge-based authentication system using
  10079. ! the \fBMD5\fP message digest algorithm.
  10080. ! This facility is documented in 
  10081. ! \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7), a book by Marshall T. Rose.
  10082. ! .sp
  10083. ! This option also causes the
  10084. ! \fBpopauth\fP program to be installed, which
  10085. ! allows the administrator to manipulate the \fBAPOP\fP
  10086. ! authorization database.
  10087. ! For more details, see \fBsupport/pop/pop-more.txt\fR
  10088. ! and the \fIAdministrator's Guide\fP.
  10089.   
  10090. + .ti -.5i
  10091. + DPOP
  10092. + .br
  10093. + This option indicates that POP subscribers do not have
  10094. + entries in the \fIpasswd\fR\|(5) file,
  10095. + and instead have their own separate database (a win).
  10096. + .ti -.5i
  10097. + KPOP
  10098. + .br
  10099. + Support for KERBEROS with POP.
  10100. + This code builds
  10101. + \fIpopd\fP, \fIinc\fP and \fImsgchk\fP to support only the 
  10102. + \*(lqkpop\*(rq protocol.
  10103. + This code is still experimental, but is available for 
  10104. + those sites wishing to test it.
  10105. + .ti -.5i
  10106. + MPOP
  10107. + .br
  10108. + This option indicates that the POP daemon will
  10109. + support the non-standard
  10110. + \fBXTND SCAN\fP command which provides performance
  10111. + enhancements when using the POP over low-speed connections.
  10112. + This option also causes an interactive POP
  10113. + client program, \fBpopi\fP, to be compiled and installed.
  10114. + A man page for the \fBpopi\fP program is also provided.
  10115. + .sp
  10116. + These extensions are described in 
  10117. + \fIThe Internet Message\fR, a book by Marshall T. Rose.
  10118. + For more details, see \fBsupport/pop/pop-more.txt\fR.
  10119. + \fBNote:\fP this option requires \*(lqbboards: pop\*(rq.
  10120. + .ti -.5i
  10121. + POP2
  10122. + .br
  10123. + Have the POP daemon understand the older
  10124. + POP2 protocol as well as the \fIMH\fP POP3 protocol \- a major win.
  10125. + The POP daemon auto-magically
  10126. + determines which POP protocol your client is using.
  10127. + If you're enabling POP service,
  10128. + there's no reason not to enable this option as well.
  10129. + See also \fIPOPSERVICE\fR.
  10130. + .ti -.5i
  10131. + POPSERVICE
  10132. + .br
  10133. + The port name the \fIMH\fP POP will use.  For historical reasons,
  10134. + this defaults to \*(lqpop\*(rq.
  10135. + .sp
  10136. + In 1987, the \fIMH\fP POP protocol
  10137. + (POP version 3) was published as RFC1081 and
  10138. + was assigned its own port number (110),
  10139. + which differs from the original POP (version 1 and 2) port number (109).
  10140. + .sp
  10141. + To have \fIMH\fP POP use the new assigned port number, 
  10142. + set POPSERVICE='\*(lqpop3\*(rq', and be sure that this service
  10143. + name is listed in your \fB/etc/services\fP file on both POP client
  10144. + and server hosts as \*(lq110/tcp\*(rq.
  10145. + If you enable \fIPOP2\fP, you can safely leave \fIPOPSERVICE\fP
  10146. + undefined unless you are using POP3 clients besides \fIMH\fP.
  10147. + .ti -.5i
  10148. + RPOP
  10149. + .br
  10150. + This option indicates that support for the UNIX variant of POP,
  10151. + RPOP, which uses privileged sockets for authentication be enabled.
  10152. + This peacefully co-exists with the standard POP.
  10153. + .ti -.5i
  10154. + SHADOW
  10155. + .br
  10156. + Indicates that the \fBpopd\fP POP server
  10157. + can find encrypted passwords in the
  10158. + \fB/etc/shadow\fR file (and not in the \fB/etc/passwd\fR file).
  10159. + It should be used only for some (newer) SYSTEM 5 systems.
  10160. + .in -.25i
  10161. + The \*(lqAPOP\*(rq and \*(lqMPOP\*(rq non-standard POP
  10162. + facilities are documented in
  10163. + \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7),
  10164. + a book by Marshall T. Rose.
  10165. + For more details, see \fBsupport/pop/pop-more.txt\fR.
  10166. + The \*(lqAPOP\*(rq option peacefully co-exists with the standard POP.
  10167. + The \*(lqMPOP\*(rq option requires \*(lqbboards: pop\*(rq.
  10168. + .Uh "Shared libraries"
  10169. + .ti -.5i
  10170. + sharedlib: off
  10171. + .br
  10172. + If \*(lqsun4\*(rq,
  10173. + makes libmh.a into a SunOS 4.0 (and later) shared library.
  10174. + If you enable this, be sure to also use \*(lqoptions SUN40\*(rq.
  10175. + If \*(lqsys5\*(rq, 
  10176. + makes libmh.a into a SYS5 R4 (and later) shared library.
  10177. + If you enable this, be sure to also use \*(lqoptions SVR4\*(rq.
  10178. + .ti -.5i
  10179. + slflags: \-pic
  10180. + .br
  10181. + The compiler flags to produce position independent code.
  10182. + .ti -.5i
  10183. + slibdir: /usr/local/lib
  10184. + .br
  10185. + The directory where the \fIMH\fP shared library should go.
  10186. + .ne 4
  10187. + .ti -.25i
  10188. + Under SunOS (sun4)
  10189. + .br
  10190. + Since some \fIMH\fP programs are setuid, they'll only look for
  10191. + the library in \*(lqtrusted\*(rq locations.  Putting the library
  10192. + somewhere besides \fB/usr/lib\fP or \fB/usr/local/lib\fP is not advisable.
  10193. + If you \fBmust\fP do this, be sure that you add the 
  10194. + path given by \fBslibdir\fP to the compiler's library search list 
  10195. + (e.g., \*(lqldoptions:\0\-L/usr/mh/lib\*(rq)
  10196. + and make sure the path starts with a leading `/'.
  10197. + You may need to run \fIldconfig\fP\|(8) manually whenever a new
  10198. + shared object is installed on the system.
  10199. + See \fIld\fR\|(1) for more information about using shared libraries.
  10200. + .ti -.25i
  10201. + Under Solaris 2.0 (and newer)
  10202. + .br
  10203. + The above instructions for SunOS apply, except you should set
  10204. + the run-time library search path using `\-R' instead of `\-L'
  10205. + (e.g., \*(lqldoptions: \-R/usr/mh/lib\*(rq).
  10206. + .Uh "General System Dependencies"
  10207. + .in -.5i
  10208. + You should include the following directives 
  10209. + which are appropriate for your version of UNIX.
  10210. + If you don't know what an
  10211. + option does, it probably doesn't apply to you.
  10212.   .in +.5i
  10213.   .ti -.5i
  10214. ! mailgroup: off
  10215.   .br
  10216. ! If set, \fIinc\fR is made set-group-id to this group name.
  10217. ! Some SYS5 systems want this to be set to \*(lqmail\*(rq.
  10218. ! Set this if your \fB/usr/spool/mail\fP is not world-writeable.
  10219.   
  10220. + Note that \fBslocal\fP doesn't know how to deal with this,
  10221. + and will not work under these systems; just making it set-group-id
  10222. + will open a security hole.
  10223. + If you're using \*(lqmailgroup\*(rq,
  10224. + you should remove \fBslocal\fP (and its man page) from your system.
  10225.   .ti -.5i
  10226. ! signal: int
  10227.   .br
  10228. ! The base type (int or void) of the function
  10229. ! parameter/return value of \fIsignal\fR\|(2).
  10230. ! The default is \fBint\fR.
  10231. ! Set \*(lqsignal void\*(rq on systems which use this type
  10232. ! (e.g., SYSTEM 5 V3.0 and later or Sun OS 4.0 and later).
  10233.   
  10234. ***************
  10235. *** 325,326 ****
  10236. --- 577,599 ----
  10237.   .ti -.5i
  10238. + sprintf: char *
  10239. + .br
  10240. + The return value of the \fIsprintf\fR library routine.
  10241. + This defaults to \*(lqchar\0*\*(rq.  Set this to \*(lqint\*(rq if
  10242. + you have an older version of SYSTEM 5 which has this routine return an
  10243. + \*(lqint\*(rq type.
  10244. + .ne 5
  10245. + .ti -.5i
  10246. + options:
  10247. + .br
  10248. + \&`\-D' options to \fIcc\fR\|(1).
  10249. + .sp
  10250. + .in +.25i
  10251. + .ti -.5i
  10252. + ALTOS
  10253. + .br
  10254. + Use on XENIX/v7 systems.
  10255. + Also, be sure to use \*(lqoptions V7\*(rq.
  10256. + .ti -.5i
  10257.   ATTVIBUG
  10258. ***************
  10259. *** 339,343 ****
  10260.   .ti -.5i
  10261. ! ATZ
  10262.   .br
  10263. ! Directs \fIMH\fR to use alpha\-timezones whenever possible.
  10264.   
  10265. --- 612,616 ----
  10266.   .ti -.5i
  10267. ! AUX
  10268.   .br
  10269. ! Use with AUX systems.
  10270.   
  10271. ***************
  10272. *** 344,359 ****
  10273.   .ti -.5i
  10274. - BANG
  10275. - .br
  10276. - Directs \fIMH\fR to favor `!' over `@' in addressing.
  10277. - .ti -.5i
  10278. - BERK
  10279. - .br
  10280. - Optional for for 4.{2,3}BSD sites running SendMail.
  10281. - Disables nearly all of the RFC822 address and header-parsing routines
  10282. - in favor of recognizing such formats as ASCnet, and so on.
  10283. - If you don't need to disable the parser for this reason,
  10284. - you probably want to use \*(lqoptions DUMB\*(rq instead.
  10285. - .ti -.5i
  10286.   BIND
  10287. --- 617,618 ----
  10288. ***************
  10289. *** 379,383 ****
  10290.   Also, be sure to use \*(lqoptions BSD42\*(rq.
  10291. ! If \fIopenlog\fR\0(3) (see \*(lqman 3 syslog\*(rq)
  10292.   takes three arguments instead of two,
  10293. ! and your \fIwrite\fR\0(1) command is set\-group\-id
  10294.   to group \*(lqtty\*(rq, use this option.
  10295. --- 638,642 ----
  10296.   Also, be sure to use \*(lqoptions BSD42\*(rq.
  10297. ! If \fIopenlog\fR\|(3) (see \*(lqman 3 syslog\*(rq)
  10298.   takes three arguments instead of two,
  10299. ! and your \fIwrite\fR\|(1) command is set\-group\-id
  10300.   to group \*(lqtty\*(rq, use this option.
  10301. ***************
  10302. *** 386,392 ****
  10303.   .ti -.5i
  10304. ! COMPAT
  10305.   .br
  10306. ! If you previously ran a version of \fIMH\fR earlier than mh.4 use this option.
  10307. ! After a short grace period,
  10308. ! remove it and re-{configure,generate,install} everything.
  10309.   
  10310. --- 645,650 ----
  10311.   .ti -.5i
  10312. ! BSD44
  10313.   .br
  10314. ! Use on Berkeley UNIX systems on or after 4.4BSD.
  10315. ! This code is still under development.
  10316.   
  10317. ***************
  10318. *** 393,397 ****
  10319.   .ti -.5i
  10320. ! DBM
  10321.   .br
  10322. ! Use this option if your \fIgetpwent\fR\0(3) routines read a 
  10323.   dbm database (such as with Yellow Pages) instead of doing
  10324. --- 651,655 ----
  10325.   .ti -.5i
  10326. ! DBMPWD
  10327.   .br
  10328. ! Use this option if your \fIgetpwent\fR\|(3) routines read a 
  10329.   dbm database (such as with Yellow Pages) instead of doing
  10330. ***************
  10331. *** 398,400 ****
  10332.   a sequential read of \fB/etc/passwd\fR.
  10333. ! Without DBM the entire passwd file is read into
  10334.   memory one entry at a time for alias expansion.
  10335. --- 656,658 ----
  10336.   a sequential read of \fB/etc/passwd\fR.
  10337. ! Without DBMPWD the entire passwd file is read into
  10338.   memory one entry at a time for alias expansion.
  10339. ***************
  10340. *** 407,411 ****
  10341.   .ti -.5i
  10342. ! DPOP
  10343.   .br
  10344. ! Enables the POP database, useful only if POP service is enabled.
  10345.   
  10346. --- 665,671 ----
  10347.   .ti -.5i
  10348. ! FCNTL
  10349.   .br
  10350. ! Directs \fIMH\fP to use the \fBfcntl()\fP system call for kernel-level
  10351. ! locking.  If you're using a SYS5 system, you may want
  10352. ! this option.  (See also `FLOCK' and `LOCKF').
  10353.   
  10354. ***************
  10355. *** 412,417 ****
  10356.   .ti -.5i
  10357. ! DUMB
  10358.   .br
  10359. ! Directs \fIMH\fR not to try and rewrite addresses to their 
  10360. ! \*(lqofficial\*(rq form.
  10361.   
  10362. --- 672,679 ----
  10363.   .ti -.5i
  10364. ! FLOCK
  10365.   .br
  10366. ! Directs \fIMH\fP to use the \fBflock()\fP system call for kernel-level
  10367. ! locking.  If you're on a BSD42 system,
  10368. ! and you're not using NFS to read or write maildrops,
  10369. ! you should enable this option.  (See also `FCNTL' and `LOCKF').
  10370.   
  10371. ***************
  10372. *** 418,424 ****
  10373.   .ti -.5i
  10374. ! FOLDPROT
  10375.   .br
  10376. ! Defines the octal value for default folder-protection.
  10377. ! For example, FOLDPROT='\*(lq0700\*(rq'.
  10378. ! The default is \*(lq0711\*(rq.
  10379.   
  10380. --- 680,685 ----
  10381.   .ti -.5i
  10382. ! HESIOD
  10383.   .br
  10384. ! Support for HESIOD.  
  10385. ! This code was contributed, and included no documentation.
  10386.   
  10387. ***************
  10388. *** 425,440 ****
  10389.   .ti -.5i
  10390. - ISI
  10391. - .br
  10392. - When using \*(lqrepl\ \-ccme\*(rq,
  10393. - only \*(lqcc:\*(rq the first address found which belongs to the user;
  10394. - any other \fIAlternate-Mailboxes\fR do not receive \*(lqcc:\*(rqs.
  10395. - .ti -.5i
  10396. - LINK
  10397. - .br
  10398. - Defines the filename for alternate file name for \fIdist\fR and \fIrepl\fR.
  10399. - For example, LINK='\*(lq\\\\043\*(rq' to use the pound\-sign character.
  10400. - The default is \*(lq@\*(rq.
  10401. - .ti -.5i
  10402.   LOCKF
  10403. --- 686,687 ----
  10404. ***************
  10405. *** 441,445 ****
  10406.   .br
  10407. ! Directs \fIMH\fP to use the \fBlockf()\fP system call for UNIX-style
  10408. ! locking instead of \fBflock()\fP.  If you're using NFS to read or
  10409. ! write maildrops, you should enable this option.
  10410.   
  10411. --- 688,693 ----
  10412.   .br
  10413. ! Directs \fIMH\fP to use the \fBlockf()\fP system call for kernel-level
  10414. ! locking.  If you're using NFS to read or
  10415. ! write maildrops, you should enable this option.  (See also `FLOCK'
  10416. ! and `FCNTL').
  10417.   
  10418. ***************
  10419. *** 448,450 ****
  10420.   .br
  10421. ! Hard\-wires the local name for the host \fIMH\fR is running on.
  10422.   For example, locname='\*(lqPICKLE\*(rq'.
  10423. --- 696,698 ----
  10424.   .br
  10425. ! Hard-wires the local name for the host \fIMH\fR is running on.
  10426.   For example, locname='\*(lqPICKLE\*(rq'.
  10427. ***************
  10428. *** 454,467 ****
  10429.   .ti -.5i
  10430. - MHE
  10431. - .br
  10432. - Enables crude support for Brien Reid's MHE interface.
  10433. - Recommended for use with the GNU Emacs mh-e package.
  10434. - .ti -.5i
  10435. - MHRC
  10436. - .br
  10437. - Enables \fIMH\fR to recognize the \fICShell\fR's `~'\-construct.
  10438. - This is useful for sites that run with a ~/.mhrc for their users.
  10439. - .ti -.5i
  10440.   MORE
  10441. --- 702,703 ----
  10442. ***************
  10443. *** 468,471 ****
  10444.   .br
  10445. ! Defines  the location of the \fImore\fR\0(1) program.
  10446. ! For example, on ALTOS and DUAL systems,
  10447.   MORE='\*(lq/usr/bin/more\*(rq'.
  10448. --- 704,707 ----
  10449.   .br
  10450. ! Defines  the location of the \fImore\fR\|(1) program.
  10451. ! On ALTOS and DUAL systems, set
  10452.   MORE='\*(lq/usr/bin/more\*(rq'.
  10453. ***************
  10454. *** 474,482 ****
  10455.   .ti -.5i
  10456. - MSGPROT
  10457. - .br
  10458. - Defines the octal value for default folder-protection
  10459. - For example, MSGPROT='\*(lq0600\*(rq'.
  10460. - The default is \*(lq0644\*(rq.
  10461. - .ti -.5i
  10462.   NDIR
  10463. --- 710,711 ----
  10464. ***************
  10465. *** 486,488 ****
  10466.   in \fB<ndir.h>\fR if this option is given.
  10467. ! Otherwise, \fIMH\fR will try \fB<ndir.h>\fR.
  10468.   If you still can't get this to work on your system,
  10469. --- 715,717 ----
  10470.   in \fB<ndir.h>\fR if this option is given.
  10471. ! Otherwise, \fIMH\fR will try \fB<dir.h>\fR.
  10472.   If you still can't get this to work on your system,
  10473. ***************
  10474. *** 489,490 ****
  10475. --- 718,720 ----
  10476.   edit \fBh/local.h\fR as appropriate.
  10477. + (See also `SYS5DIR'.)
  10478.   
  10479. ***************
  10480. *** 495,497 ****
  10481.   If you get an undefined symbol \*(lqruserpass\*(rq when compiling
  10482. ! \fIMH\fP, you need this option.
  10483.   
  10484. --- 725,729 ----
  10485.   If you get an undefined symbol \*(lqruserpass\*(rq when compiling
  10486. ! \fIMH\fP, you need this option.  If, however, you include this
  10487. ! option and get an undefined symbol \*(lq\(ru\^\(ruruserpass\*(rq
  10488. ! when compiling, then you should omit this option.
  10489.   
  10490. ***************
  10491. *** 504,510 ****
  10492.   .ti -.5i
  10493. - NOMHSEQ
  10494. - .br
  10495. - Directs \fIMH\fR to make private sequences the default.
  10496. - .ti -.5i
  10497.   NTOHLSWAP
  10498. --- 736,737 ----
  10499. ***************
  10500. *** 519,524 ****
  10501.   .ti -.5i
  10502. ! OVERHEAD
  10503.   .br
  10504. ! Enable \fIMH\fR commands to read profile/context from open fd:s
  10505. ! without doing an open(); see mh-profile(5) for the details.
  10506.   
  10507. --- 746,751 ----
  10508.   .ti -.5i
  10509. ! RENAME
  10510.   .br
  10511. ! Include this option if your system has a \fBrename()\fP library
  10512. ! call.  This is true on BSD42 and newer and some SYS5 systems.
  10513.   
  10514. ***************
  10515. *** 525,570 ****
  10516.   .ti -.5i
  10517. - POP2
  10518. - .br
  10519. - Have the POP daemon understand the older
  10520. - POP2 protocol as well as the \fIMH\fP POP3 protocol \- a major win.
  10521. - The POP daemon auto-magically
  10522. - determines which POP protocol your client is using.
  10523. - If you're enabling POP service,
  10524. - there's no reason not to enable this option as well.
  10525. - See also \fIPOPSERVICE\fR.
  10526. - .ti -.5i
  10527. - POPSERVICE
  10528. - .br
  10529. - The port name the \fIMH\fP POP will use.  For historical reasons,
  10530. - this defaults to \*(lqpop\*(rq.
  10531. - In 1987, the \fIMH\fP POP protocol
  10532. - (POP version 3) was published as RFC1081 and
  10533. - was assigned its own port number (110),
  10534. - which differs from the original POP (version 1 and 2) port number (109).
  10535. - To have \fIMH\fP POP use the new assigned port number, 
  10536. - set POPSERVICE='\*(lqpop3\*(rq', and be sure that this service
  10537. - name is listed in your \fB/etc/services\fP file on both POP client
  10538. - and server hosts as \*(lq110/tcp\*(rq.
  10539. - If you enable \fIPOP2\fP, you can safely leave this undefined unless
  10540. - you are using POP3 clients besides \fIMH\fP.
  10541. - .ti -.5i
  10542. - RPATHS
  10543. - .br
  10544. - Directs \fIinc\fR to note UNIX \*(lqFrom\ \*(rq lines as Return-Path: info.
  10545. - .ti -.5i
  10546. - RPOP
  10547. - .br
  10548. - Enables the RPOP variant of POP, useful only if POP service is enabled.
  10549. - .ti -.5i
  10550. - SBACKUP
  10551. - .br
  10552. - Defines the prefix string for backup file names.
  10553. - For example, SBACKUP='\*(lq\\\\043\*(rq'.
  10554. - The default is \*(lq,\*(rq.
  10555. - .ti -.5i
  10556.   SENDMAILBUG
  10557. --- 752,753 ----
  10558. ***************
  10559. *** 573,575 ****
  10560.   to be considered the same as code 250 (OK).
  10561. ! Enable this if you know that your SendMail will
  10562.   return this code even when it doesn't mean to indicate a failure.
  10563. --- 756,759 ----
  10564.   to be considered the same as code 250 (OK).
  10565. ! Since this might cause problems, only
  10566. ! enable this if you are certain that your SendMail will
  10567.   return this code even when it doesn't mean to indicate a failure.
  10568. ***************
  10569. *** 577,585 ****
  10570.   .ti -.5i
  10571. - SHADOW
  10572. - .br
  10573. - Indicates that the encrypted passwords can be found in the
  10574. - \fB/etc/shadow\fR file (and not in the \fB/etc/passwd\fR file).
  10575. - This option should only be used for some (newer) SYSTEM 5 systems.
  10576. - .ti -.5i
  10577.   SOCKETS
  10578. --- 761,762 ----
  10579. ***************
  10580. *** 594,606 ****
  10581.   .br
  10582. ! Use on Sun OS 4.0 (and later?) systems.  You probably also want
  10583.   \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
  10584. ! \*(lqoptions TYPESIG=void\*(rq.
  10585.   
  10586. ! .ti -.5i
  10587. ! SUN41
  10588. ! .br
  10589. ! Use on Sun OS 4.1 (and later?) systems.  You also want
  10590. ! \*(lqoptions SUN40\*(rq,
  10591. ! \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
  10592. ! \*(lqoptions TYPESIG=void\*(rq.
  10593.   
  10594. --- 771,780 ----
  10595.   .br
  10596. ! Use on Sun OS 4.0 (and later?) systems.  You also will need
  10597.   \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
  10598. ! \*(lqsignal void\*(rq.
  10599.   
  10600. ! If you're using Sun's brain-damaged approach to offering Domain
  10601. ! Name Service through NIS, be sure to include
  10602. ! \*(lqoptions BIND\*(rq and
  10603. ! \*(lqldoptions \-lresolv\*(rq to work around some NIS/DNS bugs.
  10604.   
  10605. ***************
  10606. *** 621,625 ****
  10607.   .ti -.5i
  10608. ! TTYD
  10609.   .br
  10610. ! Support for TTYD.  This is no longer in wide use, and is not recommended.
  10611.   
  10612. --- 795,803 ----
  10613.   .ti -.5i
  10614. ! SVR4
  10615.   .br
  10616. ! Use on AT&T SYSTEM 5 R4 (and newer?) UNIX systems. You should 
  10617. ! also include \*(lqoptions SYS5\*(rq and \*(lqoptions SYS5DIR\*(rq.
  10618. ! See also \fImailgroup\fR.
  10619. ! You will also need to include \*(lqoldload none\*(rq if your \fBld\fP
  10620. ! doesn't handle `\-x\0\-r' correctly.
  10621.   
  10622. ***************
  10623. *** 626,634 ****
  10624.   .ti -.5i
  10625. ! TYPESIG
  10626.   .br
  10627. ! Defines the base type (int or void) of the functions
  10628. ! being parameter/return value of \fIsignal\fR\0(2).
  10629. ! The default is \fBint\fR.
  10630. ! Set TYPESIG='void' on systems which use this type
  10631. ! (e.g., SYSTEM 5 V3.0 and later or Sun OS 4.0 and later).
  10632.   
  10633. --- 804,810 ----
  10634.   .ti -.5i
  10635. ! TERMINFO
  10636.   .br
  10637. ! Define TERMINFO if you have it.
  10638. ! You get it automatically if you're running SYS5, and you don't get
  10639. ! it if you're not.  (If you're not SYS5, you probably have termcap.)
  10640.   
  10641. ***************
  10642. *** 642,654 ****
  10643.   .ti -.5i
  10644. ! UCI
  10645.   .br
  10646. ! First, \*(lq_\*(rq and \*(lq#\*(rq are recognized as the prefixes for
  10647. ! scratch files.
  10648. ! Second, support for the UCI group\-leadership mechanism is enabled in
  10649. ! \fIconflict\fR.
  10650. ! Third, the file \fB$HOME/.signature\fR is considered to contain 
  10651. ! a single line of text which is used as the \fIFull Name\fR part
  10652. ! of your \*(lqFrom:\*(rq header.
  10653. ! This may conflict with the interpretation of this file by \fINews\fR.
  10654. ! If you're not at UCI, you probably don't want this option.
  10655.   
  10656. --- 818,823 ----
  10657.   .ti -.5i
  10658. ! UNISTD
  10659.   .br
  10660. ! Include this option if your system has the file \fB<unistd.h>\fP.
  10661. ! If not specified, the LOCKF option will include \fB<sys/fcntl.h>\fP.
  10662.   
  10663. ***************
  10664. *** 655,661 ****
  10665.   .ti -.5i
  10666. - UK
  10667. - .br
  10668. - Directs the \fIscan\fR program to generate UK-style dates.
  10669. - .ti -.5i
  10670.   V7
  10671. --- 824,825 ----
  10672. ***************
  10673. *** 666,671 ****
  10674.   .ti -.5i
  10675. ! WP
  10676.   .br
  10677. ! Enables the White Pages service.
  10678. ! Contact wpp-manager@psi.com for more information.
  10679.   
  10680. --- 830,835 ----
  10681.   .ti -.5i
  10682. ! VSPRINTF
  10683.   .br
  10684. ! Include this option if your system has the \fIvsprintf\fP\|(3)
  10685. ! library routine; otherwise, \fI\(rudoprnt\fP\|(3) will be used.
  10686.   
  10687. ***************
  10688. *** 672,676 ****
  10689.   .ti -.5i
  10690. ! WHATNOW
  10691.   .br
  10692. ! Enable certain \fIMH\fR commands to act differently when $mhdraft set.
  10693.   
  10694. --- 836,845 ----
  10695.   .ti -.5i
  10696. ! WAITINT
  10697.   .br
  10698. ! BSD42 based systems call the \fIwait\fP\|(2)
  10699. ! system routine with a pointer to type \fIunion wait\fP.
  10700. ! Include this option if you included \*(lqoptions BSD42\*(rq, but
  10701. ! your system calls the \fIwait\fP\|(2)
  10702. ! system routine with a pointer to type \fIint\fP
  10703. ! (the non-BSD42 default).
  10704.   
  10705. ***************
  10706. *** 680,682 ****
  10707.   Specify this if you have a BSD43 based system that keeps time zone
  10708. ! information /etc/zoneinfo or /usr/lib/zoneinfo (SunOS).
  10709.   With this fix the GMT offset specified in outgoing mail
  10710. --- 849,855 ----
  10711.   Specify this if you have a BSD43 based system that keeps time zone
  10712. ! information /etc/zoneinfo or /usr/lib/zoneinfo (SunOS),
  10713. ! and where 
  10714. ! the \fIstruct tm\fP 
  10715. ! returned by \fIlocaltime\fP\|(3) contains a \fItm_gmtoff\fP element
  10716. ! (see \fB/usr/include/time.h\fP).
  10717.   With this fix the GMT offset specified in outgoing mail
  10718. ***************
  10719. *** 684,686 ****
  10720. --- 857,868 ----
  10721.   to a different time zone.  See also TZNAME.
  10722. + .in -.25i
  10723. + .Uh "Site Preferences"
  10724. + .br
  10725.   .in -.5i
  10726. + These options change the
  10727. + default behavior of \fIMH\fP or enable optional features.
  10728. + Add the options which are appropriate for your configuration 
  10729. + or your site preferences.
  10730. + .in +.5i
  10731.   
  10732. ***************
  10733. *** 687,699 ****
  10734.   .ti -.5i
  10735. ! cc:
  10736.   .br
  10737. ! The name of your C compiler, if not \*(lqcc\*(rq.
  10738.   
  10739.   .ti -.5i
  10740. ! ccoptions: \-O
  10741.   .br
  10742. ! Options given directly to \fIcc\fR\0(1).
  10743. ! The most common is \*(lq\-M\*(rq if you're running \fIMH\fR on an ALTOS.
  10744. ! This defaults to \*(lq\-O\*(rq.  If you define this and want to 
  10745. ! keep \*(lq\-O\*(rq, be sure to include it explicitly.
  10746.   
  10747. --- 869,889 ----
  10748.   .ti -.5i
  10749. ! editor: prompter
  10750.   .br
  10751. ! The default editor for \fIMH\fR.
  10752.   
  10753. + .ne 5
  10754.   .ti -.5i
  10755. ! options:
  10756.   .br
  10757. ! \&`\-D' options to \fIcc\fR\|(1).
  10758. ! .sp
  10759. ! .in +.25i
  10760. ! .ne 4
  10761. ! .ti -.5i
  10762. ! ATZ
  10763. ! .br
  10764. ! Directs \fIMH\fR to use alpha\-timezones whenever possible.
  10765. ! You should not use this option if you are on the Internet,
  10766. ! since it will make your host non-compliant with RFC-1123
  10767. ! (Requirements for Internet Hosts).
  10768.   
  10769. ***************
  10770. *** 700,708 ****
  10771.   .ti -.5i
  10772. ! curses: \-lcurses\0\-ltermlib
  10773.   .br
  10774. ! This should be the loader option required to load the \fItermcap\fR\0(3)
  10775. ! and \fIcurses\fR\0(3) libraries on your system.
  10776. ! On SYS5 systems, it probably should be just \*(lq\-lcurses\*(rq.
  10777. ! Some sites have reported that both \*(lq\-lcurses\*(rq and
  10778. ! \*(lq\-ltermlib\*(rq are necessary.
  10779.   
  10780. --- 890,895 ----
  10781.   .ti -.5i
  10782. ! ATHENA
  10783.   .br
  10784. ! Makes \fIrepl\fR `\-nocc\0all' the default instead of `\-cc\0all'.
  10785. ! You may want to enable this if you're using \fIxmh\fR.
  10786.   
  10787. ***************
  10788. *** 709,717 ****
  10789.   .ti -.5i
  10790. ! ldoptions:
  10791.   .br
  10792. ! Options given directly to \fIld\fR\0(1) (via \fIcc\fR\0) at the beginning
  10793. ! of the command line.
  10794. ! Useful for machines which require arguments to tell \fIld\fR to increase the
  10795. ! stack space (e.g. the Gould, which uses \*(lq\-m\08\*(rq).
  10796. ! Usually, \*(lq\-s\*(rq is a good choice in any event.
  10797.   
  10798. --- 896,900 ----
  10799.   .ti -.5i
  10800. ! BANG
  10801.   .br
  10802. ! Directs \fIMH\fR to favor `!' over `@' in addressing.
  10803.   
  10804. ***************
  10805. *** 718,730 ****
  10806.   .ti -.5i
  10807. ! ldoptlibs:
  10808.   .br
  10809. ! Options given directly to \fIld\fR\0(1) (via \fIcc\fR\0) at the end of the
  10810. ! command line.
  10811. ! The two most common are:
  10812. ! \*(lq\-ldbm\*(rq if you're running MMDF with the \fIdbm\fR package;
  10813. ! and, \*(lq\-lndir\*(rq if you are generating \fIMH\fR on a system
  10814. ! which does not load the new directory access mechanism by default
  10815. ! (e.g., 4.1BSD, SYS5).
  10816. ! If you don't have \fIlibndir\fR on your system,
  10817. ! the sources are in \fBmiscellany/libndir/\fR.
  10818.   
  10819. --- 901,909 ----
  10820.   .ti -.5i
  10821. ! BERK
  10822.   .br
  10823. ! Optional for for 4.{2,3}BSD sites running SendMail.
  10824. ! Disables nearly all of the RFC822 address and header-parsing routines
  10825. ! in favor of recognizing such formats as ASCnet, and so on.
  10826. ! If you don't need to disable the parser for this reason,
  10827. ! you probably want to use \*(lqoptions DUMB\*(rq instead.
  10828.   
  10829. ***************
  10830. *** 731,735 ****
  10831.   .ti -.5i
  10832. ! lex: lex -nt
  10833.   .br
  10834. ! Alternative version of \fIlex\fR.  Used in \fBzotnet/tws/\fR.
  10835.   
  10836. --- 910,916 ----
  10837.   .ti -.5i
  10838. ! COMPAT
  10839.   .br
  10840. ! If you previously ran a version of \fIMH\fR earlier than mh.4 use this option.
  10841. ! After a short grace period,
  10842. ! remove it and re-{configure,generate,install} everything.
  10843.   
  10844. ***************
  10845. *** 736,743 ****
  10846.   .ti -.5i
  10847. ! sprintf: int
  10848.   .br
  10849. ! The return value of the \fIsprintf\fR library routine.
  10850. ! This defaults to \*(lqchar\ *\*(rq.  Set this to \*(lqint\*(rq if
  10851. ! you have an older version of SYSTEM 5 which has this routine return an
  10852. ! \*(lqint\*(rq type.
  10853.   
  10854. --- 917,922 ----
  10855.   .ti -.5i
  10856. ! DUMB
  10857.   .br
  10858. ! Directs \fIMH\fR not to try and rewrite addresses to their 
  10859. ! \*(lqofficial\*(rq form.
  10860.   
  10861. ***************
  10862. *** 744,749 ****
  10863.   .ti -.5i
  10864. ! sharedlib: off
  10865.   .br
  10866. ! Makes libmh.a into a shared library (only for SunOS 4.0 and later).  
  10867. ! If you enable this, be sure to use \*(lqoptions SUN40\*(rq.
  10868.   
  10869. --- 923,929 ----
  10870.   .ti -.5i
  10871. ! FOLDPROT
  10872.   .br
  10873. ! Defines the octal value for default folder-protection.
  10874. ! For example, FOLDPROT='\^\*(lq0700\*(rq\^'.
  10875. ! The default is \*(lq0711\*(rq.
  10876.   
  10877. ***************
  10878. *** 750,762 ****
  10879.   .ti -.5i
  10880. ! slibdir: /usr/local/lib
  10881.   .br
  10882. ! The directory where the \fIMH\fP shared library should go.
  10883.   
  10884. ! Since some \fIMH\fP programs are setuid, they'll only look for
  10885. ! the library in \*(lqtrusted\*(rq locations.  Putting the library
  10886. ! somewhere besides \fB/usr/lib\fP or \fB/usr/local/lib\fP is not advisable.
  10887.   
  10888. ! You may need to run \fIldconfig\fP\0(8) manually whenever a new
  10889. ! shared object is installed on the system.
  10890. ! See \fIld\fR\0(1) for more information about using shared libraries.
  10891.   
  10892. --- 930,950 ----
  10893.   .ti -.5i
  10894. ! ISI
  10895.   .br
  10896. ! When using \*(lqrepl\0\-ccme\*(rq,
  10897. ! only \*(lqcc:\*(rq the first address found which belongs to the user;
  10898. ! any other \fIAlternate-Mailboxes\fR do not receive \*(lqcc:\*(rqs.
  10899.   
  10900. ! .ti -.5i
  10901. ! LINK
  10902. ! .br
  10903. ! Defines the filename for alternate file name for \fIdist\fR and \fIrepl\fR.
  10904. ! For example, LINK='\^\*(lq\^\\\^\\\^043\*(rq\^'
  10905. ! to use the pound\-sign character.
  10906. ! The default is \*(lq@\*(rq.
  10907.   
  10908. ! .ti -.5i
  10909. ! MHE
  10910. ! .br
  10911. ! Enables crude support for Brien Reid's MHE interface.
  10912. ! Recommended for use with the GNU Emacs mh-e package.
  10913.   
  10914. ***************
  10915. *** 763,768 ****
  10916.   .ti -.5i
  10917. ! oldload: off
  10918.   .br
  10919. ! Support for the ALTOS loader if \*(lqon\*(rq.
  10920. ! Support for loaders not handling `\-x\0\-r' correctly if \*(lqnone\*(rq.
  10921.   
  10922. --- 951,956 ----
  10923.   .ti -.5i
  10924. ! MHRC
  10925.   .br
  10926. ! Enables \fIMH\fR to recognize the \fICShell\fR's `~'\-construct.
  10927. ! This is useful for sites that run with a ~/.mhrc for their users.
  10928.   
  10929. ***************
  10930. *** 769,781 ****
  10931.   .ti -.5i
  10932. ! ranlib: on
  10933.   .br
  10934. ! Support for systems with \fIranlib\fR\0(1).
  10935. ! For SYSTEM 5 systems,
  10936. ! this should be \*(lqoff\*(rq which tells \fIMH\fR to use \fIlorder\fR and
  10937. ! \fItsort\fR instead.
  10938. ! Some SYSTEM 5 sites reported that running this isn't always sufficient.
  10939. ! If this is the case,
  10940. ! then you should edit \fBconf/makefiles/uip\fR to include
  10941. ! \fB\&../sbr/libmh.a\fR and \fB../zotnet/libzot.a\fR twice in the LIBES
  10942. ! variable.
  10943.   
  10944. --- 957,970 ----
  10945.   .ti -.5i
  10946. ! MIME
  10947.   .br
  10948. ! Enables support for multi-media messages,
  10949. ! as specified in RFC 1341 \-\- a major win.
  10950. ! This allows you to include things like audio,
  10951. ! graphics, and the like, in your mail messages.
  10952. ! Several \fIMH\fP commands are extended to support these multi-media
  10953. ! messages,
  10954. ! and the \fImhn\fR command is provided to encode and decode
  10955. ! \fBMIME\fP messages.
  10956. ! For more details, see \fBmiscellany/multi-media/READ-ME\fP
  10957. ! and \fImhn\fR\|(1).
  10958.   
  10959. ***************
  10960. *** 782,785 ****
  10961.   .ti -.5i
  10962. ! tma: off
  10963.   .br
  10964.   Support for the TTI \fItrusted mail agent\fR (TMA).
  10965. --- 971,1014 ----
  10966.   .ti -.5i
  10967. ! MSGID
  10968.   .br
  10969. + Enables \fBslocal\fP to detect and surpress duplicate messages received.
  10970. + This code uses the \fB<ndbm.h>\fP library,
  10971. + and requires \*(lqoptions BSD42\*(rq since
  10972. + it uses the \fIflock\fP\|(2) system call for locking.
  10973. + (Note that this means its database locking does not work over NFS.)
  10974. + It has only been tested under SUN40.
  10975. + .ti -.5i
  10976. + MSGPROT
  10977. + .br
  10978. + Defines the octal value for default folder-protection.
  10979. + For example, MSGPROT='\^\*(lq0600\*(rq\^'.
  10980. + The default is \*(lq0644\*(rq.
  10981. + .ti -.5i
  10982. + NOMHSEQ
  10983. + .br
  10984. + Directs \fIMH\fR to make private sequences the default.
  10985. + .ti -.5i
  10986. + OVERHEAD
  10987. + .br
  10988. + Enable \fIMH\fR commands to read profile/context from open fd:s
  10989. + without doing an open(); see \fImh-profile\fP\|(5) for the details.
  10990. + .ti -.5i
  10991. + RPATHS
  10992. + .br
  10993. + Directs \fIinc\fR to note UNIX \*(lqFrom\ \*(rq lines as Return-Path: info.
  10994. + .ti -.5i
  10995. + SBACKUP
  10996. + .br
  10997. + Defines the prefix string for backup file names.
  10998. + For example, SBACKUP='\^\*(lq\^\\\^\\\^043\*(rq\^'.
  10999. + The default is \*(lq,\*(rq.
  11000. + .ti -.5i
  11001. + TMA
  11002. + .br
  11003.   Support for the TTI \fItrusted mail agent\fR (TMA).
  11004. ***************
  11005. *** 790,791 ****
  11006. --- 1019,1079 ----
  11007.   (otherwise, you don't have the software in your \fIMH\fR source tree).
  11008. + .ti -.5i
  11009. + TTYD
  11010. + .br
  11011. + Support for TTYD.  This is no longer in wide use, and is not recommended.
  11012. + .ti -.5i
  11013. + UCI
  11014. + .br
  11015. + First, \*(lq_\*(rq and \*(lq#\*(rq are recognized as the prefixes for
  11016. + scratch files.
  11017. + Second, support for the UCI group\-leadership mechanism is enabled in
  11018. + \fIconflict\fR.
  11019. + Third, the first line of the file
  11020. + file \fB$HOME/.signature\fR is used as the \fIFull Name\fR part
  11021. + of your \*(lqFrom:\*(rq header.
  11022. + This may conflict with the interpretation of this file by \fINews\fR.
  11023. + If you're not at UCI, you probably don't want this option.
  11024. + .ti -.5i
  11025. + UK
  11026. + .br
  11027. + Directs the \fIscan\fR program to generate UK-style dates by default.
  11028. + .ti -.5i
  11029. + WHATNOW
  11030. + .br
  11031. + Enable certain \fIMH\fR commands to act differently when $mhdraft set.
  11032. + .ti -.5i
  11033. + YEARMOD
  11034. + .br
  11035. + This option makes the \fImh-format\fP \fB%(year)\fP function
  11036. + always return a value less than 100.
  11037. + Enable this option if you have local \fImh-format\fP\|(5) files
  11038. + which cannot handle 4-digit years.
  11039. + You should convert these files to use a 4-character field width,
  11040. + or use the \fB%(modulo 100)\fP function to obtain a 2-digit year value.
  11041. + After a short grace period,
  11042. + remove `YEARMOD' and re-{configure,generate,install} everything.
  11043. + .in -.25i
  11044. + .Uh "Testing/debugging"
  11045. + .ti -.5i
  11046. + debug: off
  11047. + .br
  11048. + Support for debug mode of \fIMH\fR.
  11049. + Don't use this unless you know what you're doing,
  11050. + which isn't likely if you're reading this document!
  11051. + .ti -.5i
  11052. + regtest: off
  11053. + .br
  11054. + Set this to \*(lqon\*(rq
  11055. + if you are doing regression testing among different
  11056. + compilations of \fIMH\fP, and you do not want the hostname
  11057. + and compile date included in \fIMH\fP binaries.  
  11058. + .sp
  11059.   .in -.5i
  11060. ***************
  11061. *** 814,815 ****
  11062. --- 1102,1122 ----
  11063.   .PP
  11064. + \fBBefore proceeding\fP,
  11065. + you should familiarize yourself with the \fIAdministrator's Guide\fR.
  11066. + To generate an \fInroff\fR version, go to the doc/ directory
  11067. + and type:
  11068. + .sp 1
  11069. + .nf
  11070. + % (cd ../doc/; make ADMIN.doc)
  11071. + .fi
  11072. + .sp
  11073. + .PP
  11074. + If you're already running \fIMH\fR at your site,
  11075. + you should also read the \fImh\fR changes document \fBCHANGES\fP.
  11076. + The source is in \fBpapers/changes/\fR.
  11077. + .PP
  11078. + After reading the \fIAdministrator's Guide\fR, you may decide
  11079. + to change your MH configuration.  If so, cd back to the \fBconf/\fP
  11080. + directory, re-edit the file \fBMH\fP, and re-run
  11081. + \fImhconfig\fP.
  11082. + .PP
  11083.   You now proceed based on your choice of a transport system
  11084. ***************
  11085. *** 820,823 ****
  11086.   .SS SENDMAIL
  11087. ! If you want \fISendMail\fR to transport messages for \fIMH\fR,
  11088. ! then go to the mts/sendmail/ directory.
  11089.   .sp 1
  11090. --- 1127,1138 ----
  11091.   .SS SENDMAIL
  11092. ! If you have not enabled BBoards or POP
  11093. ! then no further MTS\-specific action is required on your part!
  11094. ! If you have enabled POP, but you 
  11095. ! want to let \fISendMail\fP deliver mail POP mail using its
  11096. ! standard delivery program \fB/bin/mail\fP,
  11097. ! then, again, no further MTS\-specific action is required on your part!
  11098. ! Otherwise,
  11099. ! go to the mts/sendmail/ directory.
  11100.   .sp 1
  11101. ***************
  11102. *** 970,972 ****
  11103.   If you are using \*(lqmmdf2/smtp\*(rq as your mts setting,
  11104. ! then no futher MTS\-specific action is required on your part!
  11105.   .SS "STAND\-ALONE DELIVERY"
  11106. --- 1285,1287 ----
  11107.   If you are using \*(lqmmdf2/smtp\*(rq as your mts setting,
  11108. ! then no further MTS\-specific action is required on your part!
  11109.   .SS "STAND\-ALONE DELIVERY"
  11110. ***************
  11111. *** 973,977 ****
  11112.   If, instead, you want \fIMH\fR to handle its own mail delivery,
  11113. ! then no futher MTS\-specific action is required on your part!
  11114.   .SH GENERATION
  11115. ! Go to the mh.6/ directory and generate the system.
  11116.   .sp 1
  11117. --- 1288,1292 ----
  11118.   If, instead, you want \fIMH\fR to handle its own mail delivery,
  11119. ! then no further MTS\-specific action is required on your part!
  11120.   .SH GENERATION
  11121. ! Go to the \fIMH\fP top-level directory and generate the system.
  11122.   .sp 1
  11123. ***************
  11124. *** 991,1013 ****
  11125.   .PP
  11126. - \fBBefore proceeding\fP,
  11127. - you should familiarize yourself with the \fIAdministrator's Guide\fR.
  11128. - To generate an \fInroff\fR version, go to the doc/ directory
  11129. - and type:
  11130. - .sp 1
  11131. - .nf
  11132. - % (cd doc/; make ADMIN.doc)
  11133. - .fi
  11134. - .sp 1
  11135. - To generate a \fItroff\fR version, type
  11136. - .sp 1
  11137. - .nf
  11138. - % (cd doc/; make guide)
  11139. - .fi
  11140. - .sp 1
  11141. - instead.
  11142. - .PP
  11143. - If you're already running \fIMH\fR at your site,
  11144. - you should also read the \fImh.6\fR changes documents.
  11145. - The sources are in \fBpapers/mh6.5/\fR and \fBpapers/mh6.7/\fP.
  11146. - .PP
  11147.   Next, if you enabled support for the UCI BBoards facility,
  11148. --- 1306,1307 ----
  11149. ***************
  11150. *** 1055,1057 ****
  11151.   The \fBMailAliases\fR, \fBBBoardAliases\fR, \fBmtstailor\fR and \fBBBoards\fR
  11152. ! files will not be installed over existing copies;
  11153.   you will need to edit these by
  11154. --- 1349,1351 ----
  11155.   The \fBMailAliases\fR, \fBBBoardAliases\fR, \fBmtstailor\fR and \fBBBoards\fR
  11156. ! files will \fBNOT\fP be installed over existing copies;
  11157.   you will need to edit these by
  11158. ***************
  11159. *** 1077,1080 ****
  11160.   In addition to this document,
  11161. ! the administrator's guide,
  11162. ! and the user's manual,
  11163.   there are several documents referenced by the user's manual which may be
  11164. --- 1371,1374 ----
  11165.   In addition to this document,
  11166. ! the \fIAdministrator's Guide\fP,
  11167. ! and the \fIUser's Manual\fP,
  11168.   there are several documents referenced by the user's manual which may be
  11169. ***************
  11170. *** 1092,1093 ****
  11171. --- 1386,1391 ----
  11172.   The \fImhconfig\fR program should be smarter.
  11173. + .PP
  11174. + There's no way to print the \fIAdministrator's Guide\fP
  11175. + until after you have configured the system; it is difficult
  11176. + to configure the system without the \fIAdministrator's Guide\fP.
  11177.   .PP
  11178. *** ../mh-6.7.2/conf/mhconfig.c    Mon Jan 27 09:34:35 1992
  11179. --- conf/mhconfig.c    Wed Dec  2 11:08:07 1992
  11180. ***************
  11181. *** 1,8 ****
  11182.   /* mhconfig.c - configure MH */
  11183.   /* cc [-DSYS5] mhconfig.c -o mhconfig */
  11184.   #ifndef    lint
  11185. ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.31 1992/01/27 17:34:29 jromine Exp $";
  11186. ! #endif    lint
  11187.   
  11188.   #include <ctype.h>
  11189.   #include <stdio.h>
  11190. --- 1,8 ----
  11191.   /* mhconfig.c - configure MH */
  11192.   /* cc [-DSYS5] mhconfig.c -o mhconfig */
  11193.   #ifndef    lint
  11194. ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp $";
  11195. ! #endif    /* lint */
  11196.   
  11197.   #include <ctype.h>
  11198.   #include <stdio.h>
  11199. ***************
  11200. *** 12,18 ****
  11201.   #ifdef    SYS5
  11202.   #define    index    strchr
  11203.   #define    rindex    strrchr
  11204. ! #endif    SYS5
  11205.   
  11206.   static void insopt(), mkopts();
  11207.   
  11208. --- 12,18 ----
  11209.   #ifdef    SYS5
  11210.   #define    index    strchr
  11211.   #define    rindex    strrchr
  11212. ! #endif /* SYS5 */
  11213.   
  11214.   static void insopt(), mkopts();
  11215.   
  11216. ***************
  11217. *** 29,38 ****
  11218.   #define    MAKE        "../%s/Makefile"
  11219.   
  11220.   #define    WARNING    "This file is automatically generated.  Do not edit!"
  11221. ! #define    MHRELEASE    "6.7"        /* for version: "Maj.min.pat" */
  11222. ! #define    MHCENTERFOOT    "MH.6.7"    /* for nroff page footers */
  11223.   #define    MHLEFTFOOT    "[mh.6]"    /* [mh.6]    MH.6.6   page# */
  11224. ! #define    MHSLIBVER    "1.1"        /* SunOS4 shared library version */
  11225.   
  11226.   #define    NOTOK    (-1)
  11227.   
  11228. --- 29,38 ----
  11229.   #define    MAKE        "../%s/Makefile"
  11230.   
  11231.   #define    WARNING    "This file is automatically generated.  Do not edit!"
  11232. ! #define    MHRELEASE    "6.8"        /* for version: "Maj.min.pat" */
  11233. ! #define    MHCENTERFOOT    "MH.6.8"    /* for nroff page footers */
  11234.   #define    MHLEFTFOOT    "[mh.6]"    /* [mh.6]    MH.6.6   page# */
  11235. ! #define    MHSLIBVER    "3.2"        /* SunOS4 shared library version */
  11236.   
  11237.   #define    NOTOK    (-1)
  11238.   
  11239. ***************
  11240. *** 44,52 ****
  11241.   
  11242.   /*   */
  11243.   
  11244. - static int   bsd43 = 0;
  11245.   static int   smtp = 0;
  11246. ! static int   uci = 0;
  11247.   
  11248.   static int   sedP = 1;
  11249.   static int   filesP = 1;
  11250. --- 44,51 ----
  11251.   
  11252.   /*   */
  11253.   
  11254.   static int   smtp = 0;
  11255. ! static int   mpop = 0;
  11256.   
  11257.   static int   sedP = 1;
  11258.   static int   filesP = 1;
  11259. ***************
  11260. *** 64,69 ****
  11261. --- 63,69 ----
  11262.   static char *ccoptions = NULL;
  11263.   static char *chownpath = "/etc/chown";
  11264.   static char *compiler = "/bin/cc";
  11265. + static char *copy = "cp";
  11266.   static char *curses = "-lcurses -ltermlib";
  11267.   static char *debug = "off";
  11268.   static char *editor = "prompter";
  11269. ***************
  11270. *** 71,77 ****
  11271.   static char *ldoptions = NULL;
  11272.   static char *ldoptlibs = NULL;
  11273.   static char *lex = "lex -nt";
  11274. ! static char *mailgroup = NULL;
  11275.   static char *mailpath = "/usr/spool/mail";
  11276.   static char *maildir = NULL;
  11277.   static char *mailfile = NULL;
  11278. --- 71,78 ----
  11279.   static char *ldoptions = NULL;
  11280.   static char *ldoptlibs = NULL;
  11281.   static char *lex = "lex -nt";
  11282. ! static char *ln = "ln";
  11283. ! static char *mailgroup = "off";
  11284.   static char *mailpath = "/usr/spool/mail";
  11285.   static char *maildir = NULL;
  11286.   static char *mailfile = NULL;
  11287. ***************
  11288. *** 79,94 ****
  11289.   static char *manuals = "standard";
  11290.   static char *mf = "off";
  11291.   static char *mts = "sendmail";
  11292.   static char *removeit = "mv -f";
  11293.   static char *oldload = "off";
  11294.   static char *options = NULL;
  11295.   static char *pop = "off";
  11296.   static char *ranlib = "on";
  11297.   static char *sharedlib = "off";
  11298.   static char *slibdir = "/usr/local/lib";
  11299.   static char *sprntf = NULL;
  11300. - static char *tma = "off";
  11301.   
  11302.   #define    unknown        0
  11303.   #define    mmdf        1
  11304.   #define    mmdf2        2
  11305. --- 80,100 ----
  11306.   static char *manuals = "standard";
  11307.   static char *mf = "off";
  11308.   static char *mts = "sendmail";
  11309. + static char *poppath = "/usr/etc";
  11310.   static char *removeit = "mv -f";
  11311. + static char *regtest = "off";
  11312.   static char *oldload = "off";
  11313.   static char *options = NULL;
  11314.   static char *pop = "off";
  11315.   static char *ranlib = "on";
  11316.   static char *sharedlib = "off";
  11317. + static char *signl = "int";
  11318.   static char *slibdir = "/usr/local/lib";
  11319. + static char *slflags = "-pic";
  11320.   static char *sprntf = NULL;
  11321.   
  11322. + /*   */
  11323.   #define    unknown        0
  11324.   #define    mmdf        1
  11325.   #define    mmdf2        2
  11326. ***************
  11327. *** 112,120 ****
  11328. --- 118,151 ----
  11329.       "mh", "MHMTS", mh, NOFLAGS,
  11330.       "sendmail", "SENDMTS", sendmail, NOMF,
  11331.       "sendmail/smtp", "SENDMTS SMTP", sendmail, NOMF,
  11332. +     "zmailer", "ZMAILER SENDMTS", sendmail, NOMF,
  11333. +     "zmailer/smtp", "ZMAILER SENDMTS SMTP", sendmail, NOMF,
  11334.       NULL, NULL, unknown, NOFLAGS
  11335.   };
  11336.   
  11337. + /* other options which cause sed BEGIN/END configuration changes */
  11338. + static struct copt {
  11339. +     char *c_name;
  11340. +     int   c_value;
  11341. + }    copts[] = {
  11342. +     "APOP", 0,    /* authenticated pop */
  11343. +     "BSD43", 0,    /* sgid ttys */
  11344. +     "KPOP", 0,     /* KERBEROS pop */
  11345. +     "HESIOD", 0,
  11346. +     "MIME", 0,    /* multi-media extensions */
  11347. +     "MPOP", 0,    /* mobile pop */
  11348. +     "MSGID", 0, /* slocal dup surpression */
  11349. +     "TMA", 0,    /* trusted mail */
  11350. +     "TTYD", 0,
  11351. +     "UCI", 0,
  11352. +     NULL, 0
  11353. + };
  11354. + /*   */
  11355.   static struct bind {
  11356.       char   *keyword;
  11357.   
  11358. ***************
  11359. *** 131,136 ****
  11360. --- 162,168 ----
  11361.               "ccoptions", &ccoptions, BD_ADD,
  11362.               "chown", &chownpath, BD_NIL,
  11363.               "cc", &compiler, BD_NIL,
  11364. +             "cp", ©, BD_NIL,
  11365.               "curses", &curses, BD_NIL,
  11366.               "debug", &debug, BD_NIL,
  11367.               "editor", &editor, BD_NIL,
  11368. ***************
  11369. *** 138,143 ****
  11370. --- 170,176 ----
  11371.               "ldoptions", &ldoptions, BD_ADD,
  11372.               "ldoptlibs", &ldoptlibs, BD_ADD,
  11373.               "lex", &lex, BD_NIL,
  11374. +             "ln", &ln, BD_NIL,
  11375.                           "mail", &mailpath, BD_NIL,
  11376.               "mailgroup", &mailgroup, BD_NIL,
  11377.                           "mandir", &mandir, BD_NIL,
  11378. ***************
  11379. *** 147,161 ****
  11380.               "oldload", &oldload, BD_NIL,
  11381.                           "options", &options, BD_ADD,
  11382.                           "pop", &pop, BD_NIL,
  11383.               "ranlib", &ranlib, BD_NIL,
  11384.               "remove", &removeit, BD_NIL,
  11385.               "sharedlib", &sharedlib, BD_NIL,
  11386.               "slibdir", &slibdir, BD_NIL,
  11387.               "sprintf", &sprntf, BD_NIL,
  11388. -             "tma", &tma, BD_NIL,
  11389.                           NULL
  11390.   };
  11391.   
  11392.   
  11393.   char   *files[] = {
  11394.       "../support/bboards/bboards.daily",
  11395. --- 180,198 ----
  11396.               "oldload", &oldload, BD_NIL,
  11397.                           "options", &options, BD_ADD,
  11398.                           "pop", &pop, BD_NIL,
  11399. +             "popdir", &poppath, BD_NIL,
  11400.               "ranlib", &ranlib, BD_NIL,
  11401.               "remove", &removeit, BD_NIL,
  11402. +             "regtest", ®test, BD_NIL,
  11403.               "sharedlib", &sharedlib, BD_NIL,
  11404. +             "signal", &signl, BD_NIL,
  11405. +             "slflags", &slflags, BD_NIL,
  11406.               "slibdir", &slibdir, BD_NIL,
  11407.               "sprintf", &sprntf, BD_NIL,
  11408.                           NULL
  11409.   };
  11410.   
  11411. + /*   */
  11412.   
  11413.   char   *files[] = {
  11414.       "../support/bboards/bboards.daily",
  11415. ***************
  11416. *** 230,236 ****
  11417.       printf ("Don't forget to edit \"config/mtstailor\"\n");
  11418.   #endif
  11419.       if (filesP || makeP)
  11420. !     printf ("Don't forget to run \"make clean\" before compiling\n");
  11421.   
  11422.       exit (0);
  11423.   }
  11424. --- 267,273 ----
  11425.       printf ("Don't forget to edit \"config/mtstailor\"\n");
  11426.   #endif
  11427.       if (filesP || makeP)
  11428. !     printf ("Don't forget to run \"make clean\" in the top directory before compiling\n");
  11429.   
  11430.       exit (0);
  11431.   }
  11432. ***************
  11433. *** 255,265 ****
  11434.       fprintf (fp, "%s\n%s\n%s\n%s\n", 
  11435.       "s!^@END: \\(.*\\)$!.br\\",
  11436.       ".ti 0i\\",
  11437. !     "#endif \\1\\",
  11438.       ".br!"
  11439.       );
  11440.   }
  11441.   
  11442.   static do_sedfile (sed, flag)
  11443.   char    *sed;
  11444.   int    flag;
  11445. --- 292,304 ----
  11446.       fprintf (fp, "%s\n%s\n%s\n%s\n", 
  11447.       "s!^@END: \\(.*\\)$!.br\\",
  11448.       ".ti 0i\\",
  11449. !     "#endif /* \\1\\ */",
  11450.       ".br!"
  11451.       );
  11452.   }
  11453.   
  11454. + /*   */
  11455.   static do_sedfile (sed, flag)
  11456.   char    *sed;
  11457.   int    flag;
  11458. ***************
  11459. *** 266,271 ****
  11460. --- 305,311 ----
  11461.   {
  11462.       int     i;
  11463.       FILE * fp;
  11464. +     struct copt *op;
  11465.   
  11466.       if ((fp = fopen (sed, "w")) == NULL)
  11467.       adios (sed, "unable to write");
  11468. ***************
  11469. *** 284,289 ****
  11470. --- 324,330 ----
  11471.       fprintf (fp, "s%%@(MHLEFTFOOT)%%%s%%g\n", MHLEFTFOOT);
  11472.       fprintf (fp, "s%%@(MHBINPATH)%%%s%%g\n", SVAL (binpath));
  11473.       fprintf (fp, "s%%@(MHETCPATH)%%%s%%g\n", SVAL (etcpath));
  11474. +     fprintf (fp, "s%%@(MHPOPDPATH)%%%s%%g\n", SVAL (poppath));
  11475.       fprintf (fp, "s%%@(MHCHOWNPATH)%%%s%%g\n", SVAL (chownpath));
  11476.       fprintf (fp, "s%%@(MHDROPATH)%%%s%%g\n", SVAL (maildir));
  11477.       fprintf (fp, "s%%@(MHDROPFIL)%%%s%%g\n", SVAL (mailfile));
  11478. ***************
  11479. *** 311,317 ****
  11480.               : strcmp (manuals, "old") == 0 ? 'o'
  11481.               : 'l');
  11482.       }
  11483. !     if (strcmp (manuals, "gen") == 0)
  11484.       fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
  11485.       else
  11486.       fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
  11487. --- 352,366 ----
  11488.               : strcmp (manuals, "old") == 0 ? 'o'
  11489.               : 'l');
  11490.       }
  11491. ! /*   */
  11492. !     if (strcmp (regtest, "on") == 0)
  11493. !     fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "-n");
  11494. !     else
  11495. !     fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "");
  11496. !     if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "gen") == 0)
  11497.       fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
  11498.       else
  11499.       fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
  11500. ***************
  11501. *** 319,324 ****
  11502. --- 368,375 ----
  11503.       fprintf (fp, "s%%@(MHEDITOR)%%%s%%g\n", SVAL (editor));
  11504.       fprintf (fp, "s%%@(MHCONFIG)%%%s%%g\n", SVAL (myopts));
  11505.       fprintf (fp, "s%%@(MHCOMPILER)%%%s%%g\n", SVAL (compiler));
  11506. +     fprintf (fp, "s%%@(CP)%%%s%%g\n", SVAL (copy));
  11507. +     fprintf (fp, "s%%@(LN)%%%s%%g\n", SVAL (ln));
  11508.       fprintf (fp, "s%%@(LEX)%%%s%%g\n", SVAL (lex));
  11509.       if (ccoptions)
  11510.       fprintf (fp, "s%%@(MHOPTIONS)%%%s %s%%g\n",
  11511. ***************
  11512. *** 349,355 ****
  11513.       fprintf (fp, "/^@BEGIN: OPTIM$/d\n/^@END: OPTIM$/d\n");
  11514.       }
  11515.   
  11516. !     if (mailgroup && strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
  11517.       fprintf (fp, "/^@BEGIN: MAILGROUP$/d\n/^@END: MAILGROUP$/d\n");
  11518.       fprintf (fp, "s%%@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup));
  11519.       }
  11520. --- 400,406 ----
  11521.       fprintf (fp, "/^@BEGIN: OPTIM$/d\n/^@END: OPTIM$/d\n");
  11522.       }
  11523.   
  11524. !     if (strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
  11525.       fprintf (fp, "/^@BEGIN: MAILGROUP$/d\n/^@END: MAILGROUP$/d\n");
  11526.       fprintf (fp, "s%%@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup));
  11527.       }
  11528. ***************
  11529. *** 365,370 ****
  11530. --- 416,423 ----
  11531.       else
  11532.       fprintf (fp, "/^@BEGIN: NEWLOAD$/,/^@END: NEWLOAD$/d\n");
  11533.   
  11534. + /*   */
  11535.       if (strcmp (ranlib, "on") == 0) {
  11536.       fprintf (fp, "/^@BEGIN: RANLIB$/d\n/^@END: RANLIB$/d\n");
  11537.       fprintf (fp, "/^@BEGIN: LORDER$/,/^@END: LORDER$/d\n");
  11538. ***************
  11539. *** 374,384 ****
  11540.       fprintf (fp, "/^@BEGIN: RANLIB$/,/^@END: RANLIB$/d\n");
  11541.       }
  11542.   
  11543. !     if (strcmp (sharedlib, "on") == 0 || strcmp (sharedlib, "secure") == 0) {
  11544.       fprintf (fp, "/^@BEGIN: SHAREDLIB$/d\n/^@END: SHAREDLIB$/d\n");
  11545.       fprintf (fp, "/^@BEGIN: STDLIB$/,/^@END: STDLIB$/d\n");
  11546. !     fprintf (fp, "s%%@(SLIBDIR)%%%s%%g\n",slibdir);
  11547.       fprintf (fp, "s%%@(SLIBVER)%%%s%%g\n", MHSLIBVER);
  11548.       if (strcmp (sharedlib, "secure") == 0)
  11549.           fprintf (fp, "s%%@(SLDFLAG)%%-L%s%%g\n",slibdir);
  11550.       else
  11551. --- 427,438 ----
  11552.       fprintf (fp, "/^@BEGIN: RANLIB$/,/^@END: RANLIB$/d\n");
  11553.       }
  11554.   
  11555. !     if (strcmp (sharedlib, "off")) {    /* if not off */
  11556.       fprintf (fp, "/^@BEGIN: SHAREDLIB$/d\n/^@END: SHAREDLIB$/d\n");
  11557.       fprintf (fp, "/^@BEGIN: STDLIB$/,/^@END: STDLIB$/d\n");
  11558. !     fprintf (fp, "s%%@(SLIBDIR)%%%s%%g\n", slibdir);
  11559.       fprintf (fp, "s%%@(SLIBVER)%%%s%%g\n", MHSLIBVER);
  11560. +     fprintf (fp, "s%%@(SLFLAGS)%%%s%%g\n", SVAL(slflags));
  11561.       if (strcmp (sharedlib, "secure") == 0)
  11562.           fprintf (fp, "s%%@(SLDFLAG)%%-L%s%%g\n",slibdir);
  11563.       else
  11564. ***************
  11565. *** 388,398 ****
  11566.       fprintf (fp, "/^@BEGIN: STDLIB$/d\n/^@END: STDLIB$/d\n");
  11567.       fprintf (fp, "/^@BEGIN: SHAREDLIB$/,/^@END: SHAREDLIB$/d\n");
  11568.       }
  11569. !     if (strcmp (tma, "on") == 0)
  11570. !     fprintf (fp, "/^@BEGIN: TMA$/d\n/^@END: TMA$/d\n");
  11571.       else
  11572. !     fprintf (fp, "/^@BEGIN: TMA$/,/^@END: TMA$/d\n");
  11573.       if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) {
  11574.       fprintf (fp, "/^@BEGIN: MMDFMTS$/d\n/^@END: MMDFMTS$/d\n");
  11575.       if (mtsnum == mmdf)
  11576. --- 442,458 ----
  11577.       fprintf (fp, "/^@BEGIN: STDLIB$/d\n/^@END: STDLIB$/d\n");
  11578.       fprintf (fp, "/^@BEGIN: SHAREDLIB$/,/^@END: SHAREDLIB$/d\n");
  11579.       }
  11580. !     if (strcmp (sharedlib, "sun4") == 0 || strcmp (sharedlib, "on") == 0)
  11581. !     fprintf (fp, "/^@BEGIN: SUN4SHLIB$/d\n/^@END: SUN4SHLIB$/d\n");
  11582.       else
  11583. !     fprintf (fp, "/^@BEGIN: SUN4SHLIB$/,/^@END: SUN4SHLIB$/d\n");
  11584. !     if (strcmp (sharedlib, "sys5") == 0)
  11585. !     fprintf (fp, "/^@BEGIN: SYS5SHLIB$/d\n/^@END: SYS5SHLIB$/d\n");
  11586. !     else
  11587. !     fprintf (fp, "/^@BEGIN: SYS5SHLIB$/,/^@END: SYS5SHLIB$/d\n");
  11588. ! /*   */
  11589.       if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) {
  11590.       fprintf (fp, "/^@BEGIN: MMDFMTS$/d\n/^@END: MMDFMTS$/d\n");
  11591.       if (mtsnum == mmdf)
  11592. ***************
  11593. *** 431,450 ****
  11594.           fprintf (fp, "/^@BEGIN: SENDMTSHACK$/,/^@END: SENDMTSHACK$/d\n");
  11595.           break;
  11596.       }
  11597.       /* special hack for support/pop/popser.c */
  11598.       fprintf (fp, "s%%@(POPUUMBOX)%%%s%%g\n",
  11599.           mtsnum == sendmail ? "-DPOPUUMBOX" : "");
  11600.   
  11601. -     if (bsd43)        /* for sgid(tty)-rcvtty */
  11602. -     fprintf (fp, "/^@BEGIN: BSD43$/d\n/^@END: BSD43$/d\n");
  11603. -     else
  11604. -     fprintf (fp, "/^@BEGIN: BSD43$/,/^@END: BSD43$/d\n");
  11605. -     if (uci)
  11606. -     fprintf (fp, "/^@BEGIN: UCI$/d\n/^@END: UCI$/d\n");
  11607. -     else
  11608. -     fprintf (fp, "/^@BEGIN: UCI$/,/^@END: UCI$/d\n");
  11609.       if (smtp)
  11610.       fprintf (fp, "/^@BEGIN: SMTP$/d\n/^@END: SMTP$/d\n");
  11611.       else
  11612. --- 491,503 ----
  11613.           fprintf (fp, "/^@BEGIN: SENDMTSHACK$/,/^@END: SENDMTSHACK$/d\n");
  11614.           break;
  11615.       }
  11616. + /*   */
  11617.       /* special hack for support/pop/popser.c */
  11618.       fprintf (fp, "s%%@(POPUUMBOX)%%%s%%g\n",
  11619.           mtsnum == sendmail ? "-DPOPUUMBOX" : "");
  11620.   
  11621.       if (smtp)
  11622.       fprintf (fp, "/^@BEGIN: SMTP$/d\n/^@END: SMTP$/d\n");
  11623.       else
  11624. ***************
  11625. *** 472,477 ****
  11626. --- 525,536 ----
  11627.   
  11628.       fprintf (fp, "s%%@(MHREMOVE)%%%s%%g\n", SVAL (removeit));
  11629.   
  11630. +     for (op = copts; op->c_name; op++) {
  11631. +     fprintf (fp, op->c_value ? "/^@BEGIN: %s$/d\n/^@END: %s$/d\n" :
  11632. +                  "/^@BEGIN: %s$/,/^@END: %s$/d\n",
  11633. +              op->c_name, op->c_name);
  11634. +     }
  11635.       (void) fclose (fp);
  11636.   }
  11637.   
  11638. ***************
  11639. *** 570,598 ****
  11640.       }
  11641.       break;
  11642.       }
  11643. !     if ((config = *vec++) == NULL || *vec != NULL)
  11644.       adios (NULLCP, "usage: %s file", myname);
  11645.   
  11646.       if ((fp = fopen (config, "r")) == NULL)
  11647.       adios (config, "unable to read");
  11648.   
  11649.       while (fgets (buffer, sizeof buffer, fp)) {
  11650.       if (ap = index (buffer, '\n'))
  11651. !         *ap-- = NULL;
  11652.       else
  11653.           ap = &buffer[strlen (buffer) - 1];
  11654.       while (ap >= buffer)
  11655.           if (isspace (*ap))
  11656. !         *ap = NULL;
  11657.           else
  11658.           break;
  11659.       for (cp = buffer; isspace (*cp); cp++)
  11660.           continue;
  11661. !     if (*cp == NULL || *cp == '#')
  11662.           continue;
  11663.       for (ap = cp; *ap; ap++)
  11664. !         if (isspace (*ap)) {
  11665. !         *ap++ = NULL;
  11666.           while (isspace (*ap))
  11667.               ap++;
  11668.           break;
  11669. --- 629,659 ----
  11670.       }
  11671.       break;
  11672.       }
  11673. !     if ((config = *vec) == NULL || vec[1] != NULL) /* no arg or too many */
  11674.       adios (NULLCP, "usage: %s file", myname);
  11675.   
  11676. + /*   */
  11677.       if ((fp = fopen (config, "r")) == NULL)
  11678.       adios (config, "unable to read");
  11679.   
  11680.       while (fgets (buffer, sizeof buffer, fp)) {
  11681.       if (ap = index (buffer, '\n'))
  11682. !         *ap-- = '\0';
  11683.       else
  11684.           ap = &buffer[strlen (buffer) - 1];
  11685.       while (ap >= buffer)
  11686.           if (isspace (*ap))
  11687. !         *ap = '\0';
  11688.           else
  11689.           break;
  11690.       for (cp = buffer; isspace (*cp); cp++)
  11691.           continue;
  11692. !     if (*cp == '\0' || *cp == '#')
  11693.           continue;
  11694.       for (ap = cp; *ap; ap++)
  11695. !         if (isspace (*ap) || *ap == ':') {
  11696. !         *ap++ = '\0';
  11697.           while (isspace (*ap))
  11698.               ap++;
  11699.           break;
  11700. ***************
  11701. *** 637,642 ****
  11702. --- 698,705 ----
  11703.       adios (NULLCP, "etc must be specified in %s", config);
  11704.       trim (etcpath);
  11705.   
  11706. +     if (strcmp (mailgroup, "off"))    /* if not "off" */
  11707. +     add_option ("MAILGROUP");
  11708.       if (mailpath == NULL)
  11709.       adios (NULLCP, "mail must be specified in %s", config);
  11710.       trim (mailpath);
  11711. ***************
  11712. *** 678,683 ****
  11713. --- 741,749 ----
  11714.       else if (strcmp (bboards, "nntp") == 0) {
  11715.       add_option ("BPOP");/* used by msh.c & bbc.c, but see also pshsbr.c */
  11716.       add_option ("NNTP");
  11717. +     if (mpop)
  11718. +         adios (NULLCP,
  11719. +         "bboards \"nntp\" is incompatible with \"options MPOP\"");
  11720.       }
  11721.   
  11722.       if (strcmp (mf, "on") && strcmp (mf, "off"))
  11723. ***************
  11724. *** 694,709 ****
  11725.       }
  11726.   
  11727.       if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
  11728.           && strcmp (sharedlib, "secure"))
  11729.       adios (NULLCP,
  11730. !         "sharedlib should be either \"on\", \"off\", or \"secure\", not %s",
  11731.           sharedlib);
  11732.   
  11733. !     if (strcmp (tma, "on") && strcmp (tma, "off"))
  11734. !     adios (NULLCP, "tma should be either \"on\" or \"off\", not %s", tma);
  11735. !     if (strcmp (tma, "on") == 0)
  11736. !     add_option ("TMA");
  11737.   
  11738.       begin_myopt ();
  11739.       if (cp = options) {
  11740.       for (ap = cp; *ap; ap++)
  11741. --- 760,776 ----
  11742.       }
  11743.   
  11744.       if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
  11745. +         && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
  11746.           && strcmp (sharedlib, "secure"))
  11747.       adios (NULLCP,
  11748. !         "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
  11749.           sharedlib);
  11750.   
  11751. !     (void) sprintf(buffer, "TYPESIG=%s", signl);
  11752. !     add_option (buffer);
  11753.   
  11754. + /* loop over options string and add -D ccoptions */
  11755.       begin_myopt ();
  11756.       if (cp = options) {
  11757.       for (ap = cp; *ap; ap++)
  11758. ***************
  11759. *** 711,717 ****
  11760.           *ap = ' ';
  11761.       options = NULL;
  11762.       for (ap = cp; dp = index (ap, ' '); ap = dp) {
  11763. !         *dp++ = NULL;
  11764.           add_myopt (ap);
  11765.           (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
  11766.           ap = buffer;
  11767. --- 778,784 ----
  11768.           *ap = ' ';
  11769.       options = NULL;
  11770.       for (ap = cp; dp = index (ap, ' '); ap = dp) {
  11771. !         *dp++ = '\0';
  11772.           add_myopt (ap);
  11773.           (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
  11774.           ap = buffer;
  11775. ***************
  11776. *** 728,733 ****
  11777. --- 795,803 ----
  11778.       free (cp);
  11779.       }
  11780.       end_myopt ();
  11781. +     if (strcmp (bboards, "nntp") == 0 && mpop)
  11782. +     adios (NULLCP,
  11783. +         "bboards \"nntp\" is incompatible with \"options MPOP\"");
  11784.   }
  11785.   
  11786.   /*   */
  11787. ***************
  11788. *** 750,765 ****
  11789.       int     len;
  11790.       char   *bp,
  11791.               buffer[BUFSIZ];
  11792.       static int  nameoutput = 0;
  11793.       static int  linepos = 0;
  11794.       static int  outputlinelen = 72;
  11795.   
  11796.       if (smtp && strcmp (s, "BERK") == 0) {
  11797.       fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n");
  11798.       smtp = 0;
  11799.       }
  11800. -     if (strcmp (s, "UCI") == 0) uci = 1;
  11801. -     if (strcmp (s, "BSD43") == 0) bsd43 = 1;
  11802.       if (!nameoutput) {
  11803.       printf ("%s: ", bp = "options");
  11804.       linepos += (nameoutput = strlen (bp) + 2);
  11805. --- 820,842 ----
  11806.       int     len;
  11807.       char   *bp,
  11808.               buffer[BUFSIZ];
  11809. +     struct copt *op;
  11810.       static int  nameoutput = 0;
  11811.       static int  linepos = 0;
  11812.       static int  outputlinelen = 72;
  11813.   
  11814. +     for (op = copts; op->c_name; op++)
  11815. +     if (!strncmp (op->c_name,s,strlen(op->c_name))) {
  11816. +         op->c_value = 1;
  11817. +         break;
  11818. +     }
  11819. +     if (strcmp (s, "MPOP") == 0)
  11820. +     mpop = 1;
  11821.       if (smtp && strcmp (s, "BERK") == 0) {
  11822.       fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n");
  11823.       smtp = 0;
  11824.       }
  11825.       if (!nameoutput) {
  11826.       printf ("%s: ", bp = "options");
  11827.       linepos += (nameoutput = strlen (bp) + 2);
  11828. ***************
  11829. *** 802,809 ****
  11830.   
  11831.       if (s == NULL || (p = rindex (s, '/')) == NULL)
  11832.       return;
  11833. !     if (*++p == NULL)
  11834. !     *--p = NULL;
  11835.   }
  11836.   
  11837.   
  11838. --- 879,886 ----
  11839.   
  11840.       if (s == NULL || (p = rindex (s, '/')) == NULL)
  11841.       return;
  11842. !     if (*++p == '\0')
  11843. !     *--p = '\0';
  11844.   }
  11845.   
  11846.   
  11847. ***************
  11848. *** 814,820 ****
  11849.   
  11850.       if (p = rindex (s, '/'))
  11851.       p++;
  11852. !     return ((p == NULL || *p == NULL) ? s : p);
  11853.   }
  11854.   
  11855.   /*   */
  11856. --- 891,897 ----
  11857.   
  11858.       if (p = rindex (s, '/'))
  11859.       p++;
  11860. !     return ((p == NULL || *p == '\0') ? s : p);
  11861.   }
  11862.   
  11863.   /*   */
  11864. ***************
  11865. *** 825,831 ****
  11866.   {
  11867.       char   *p;
  11868.   
  11869. !     if (s1 == NULL || *s1 == NULL)
  11870.       return s2;
  11871.       if (s2 == NULL)
  11872.       return strdup (s1);
  11873. --- 902,908 ----
  11874.   {
  11875.       char   *p;
  11876.   
  11877. !     if (s1 == NULL || *s1 == '\0')
  11878.       return s2;
  11879.       if (s2 == NULL)
  11880.       return strdup (s1);
  11881. ***************
  11882. *** 885,891 ****
  11883.   
  11884.       return t;
  11885.   }
  11886. ! #endif    notdef
  11887.   
  11888.   /*   */
  11889.   
  11890. --- 962,968 ----
  11891.   
  11892.       return t;
  11893.   }
  11894. ! #endif /* notdef */
  11895.   
  11896.   /*   */
  11897.   
  11898. *** /dev/null    Tue Dec 15 08:01:10 1992
  11899. --- conf/tailor/clcs.com.au    Thu Dec 10 11:37:57 1992
  11900. ***************
  11901. *** 0 ****
  11902. --- 1,11 ----
  11903. + mmdfldir:    /var/mail
  11904. + mmdflfil:    
  11905. + hostable:    /usr/local/lib/mh/hosts
  11906. + sendmail:    /usr/ucblib/sendmail
  11907. + okhosts:    /usr/local/lib/mh/Rmail.OKHosts
  11908. + okdests:    /usr/local/lib/mh/Rmail.OKDests
  11909. + systemname:    mars
  11910. + localname:    mars
  11911. + servers:    mars \01localnet
  11912. *** /dev/null    Tue Dec 15 08:01:10 1992
  11913. --- conf/tailor/dbc    Wed Dec  2 13:32:06 1992
  11914. ***************
  11915. *** 0 ****
  11916. --- 1,4 ----
  11917. + mmdfldir:    
  11918. + mmdflfil:    .maildrop
  11919. + hostable:    /usr/local/lib/mh/hosts
  11920. + servers:    localhost
  11921. *** /dev/null    Tue Dec 15 08:01:10 1992
  11922. --- conf/tailor/ncr-sys5r4    Mon Feb 10 16:52:47 1992
  11923. ***************
  11924. *** 0 ****
  11925. --- 1,10 ----
  11926. + localname:    ncrtest.ncr.com
  11927. + systemname:    ncrtest
  11928. + mmdfldir:
  11929. + mmdflfil:    .mail
  11930. + mmdelim1:       \001\001\001\001\n
  11931. + mmdelim2:       \001\001\001\001\n
  11932. + hostable:    /usr/local/lib/mh/hosts
  11933. + servers:    localhost \01localnet
  11934. + lockldir:    /usr/mmdf/log/locks
  11935. + lockstyle:    2
  11936. *** /dev/null    Tue Dec 15 08:01:10 1992
  11937. --- conf/tailor/rpi.edu    Fri Dec  4 09:14:43 1992
  11938. ***************
  11939. *** 0 ****
  11940. --- 1,9 ----
  11941. + everyone:    65334
  11942. + localname:    rpi.edu
  11943. + lockstyle:    0
  11944. + lockldir:
  11945. + mmdfldir:    /usr/spool/mail
  11946. + mmdflfil:    
  11947. + hostable:    /etc/hosts
  11948. + servers:    mail.its.rpi.edu mail1.its.rpi.edu rpi.edu \01rpi.edu
  11949. + pophost:        mail.its.rpi.edu
  11950. *** ../mh-6.7.2/config/version.sh    Thu Jan 30 14:20:46 1992
  11951. --- config/version.sh    Wed Feb  5 13:07:41 1992
  11952. ***************
  11953. *** 1,3 ****
  11954.   : run this script through /bin/sh
  11955. ! : '@(#)$Id: version.sh,v 1.9 1992/01/30 22:20:41 jromine Exp $'
  11956.   case $# in
  11957. --- 1,3 ----
  11958.   : run this script through /bin/sh
  11959. ! : '@(#)$Id: version.sh,v 1.9 1992/01/30 22:20:41 jromine Exp jromine $'
  11960.   case $# in
  11961. ***************
  11962. *** 4,5 ****
  11963. --- 4,6 ----
  11964.     0) set "6.6";;
  11965. +   2) flag="$1"; shift;;
  11966.   esac
  11967. ***************
  11968. *** 48,50 ****
  11969.         if (patch > 0) {\
  11970. !       printf "char *version = \"@(#)MH %s.%s.%s #%d[UCI] ", \
  11971.           major, minor, patch, local > "version.c"; \
  11972. --- 49,51 ----
  11973.         if (patch > 0) {\
  11974. !       printf "char *version = \"@(#)MH %s.%s.%s #%d[UCI]", \
  11975.           major, minor, patch, local > "version.c"; \
  11976. ***************
  11977. *** 62,63 ****
  11978.   }' && mv _version version
  11979. ! echo '('$LOCAL') of '`date`'";' >> version.c
  11980. --- 63,67 ----
  11981.   }' && mv _version version
  11982. ! case x${flag} in
  11983. !     x) echo ' ('$LOCAL') of '`date`'";' >> version.c ;;
  11984. !   x-n) echo '";' >> version.c ;;
  11985. ! esac
  11986. *** ../mh-6.7.2/dist/Makefile    Thu Feb 13 12:26:30 1992
  11987. --- dist/Makefile    Mon Dec 14 16:36:08 1992
  11988. ***************
  11989. *** 4,6 ****
  11990.   #    This file is automatically generated.  Do not edit!
  11991. ! # @(#)$Id: dist,v 2.6 90/04/08 20:01:28 sources Exp $
  11992.   ##############################################################################
  11993. --- 4,6 ----
  11994.   #    This file is automatically generated.  Do not edit!
  11995. ! # @(#)$Id: dist,v 2.7 1992/12/02 22:21:43 jromine Exp $
  11996.   ##############################################################################
  11997. ***************
  11998. *** 27,29 ****
  11999.   TARGETS    =    ../READ-ME \
  12000. !         mh-gen.cat MH.cat ADMIN.cat mh6.7.cat \
  12001.           bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
  12002. --- 27,29 ----
  12003.   TARGETS    =    ../READ-ME \
  12004. !         mh-gen.cat MH.cat ADMIN.cat mh-changes.cat \
  12005.           bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
  12006. ***************
  12007. *** 35,37 ****
  12008.   
  12009. ! doc:        MH.doc ADMIN.doc mh6.7.doc
  12010.   
  12011. --- 35,37 ----
  12012.   
  12013. ! doc:        MH.doc ADMIN.doc mh-changes.doc
  12014.   
  12015. ***************
  12016. *** 38,40 ****
  12017.   
  12018. ! IMPRESS    =    mh-gen.imp MH.imp ADMIN.imp mh6.7.imp \
  12019.           bboards.imp beginners.imp \
  12020. --- 38,40 ----
  12021.   
  12022. ! IMPRESS    =    mh-gen.imp MH.imp ADMIN.imp mh-changes.imp \
  12023.           bboards.imp beginners.imp \
  12024. ***************
  12025. *** 50,52 ****
  12026.       lpr -t -J ADMIN ADMIN.cat
  12027. !     lpr -t -J MH.6.7 mh6.7.cat
  12028.       lpr -d -J BBoards bboards.dvi
  12029. --- 50,52 ----
  12030.       lpr -t -J ADMIN ADMIN.cat
  12031. !     lpr -t -J MH-CHANGES mh-changes.cat
  12032.       lpr -d -J BBoards bboards.dvi
  12033. ***************
  12034. *** 83,89 ****
  12035.   
  12036. ! mh6.7.cat \
  12037. ! mh6.7.doc \
  12038. ! mh6.7.imp:    true
  12039. !         cd ../papers/mh6.7; make $@
  12040. !         cp ../papers/mh6.7/$@ $@
  12041.   
  12042. --- 83,89 ----
  12043.   
  12044. ! mh-changes.cat \
  12045. ! mh-changes.doc \
  12046. ! mh-changes.imp:    true
  12047. !         cd ../papers/changes; make $@
  12048. !         cp ../papers/changes/$@ $@
  12049.   
  12050. *** ../mh-6.7.2/h/addrsbr.h    Thu Oct 29 14:56:13 1987
  12051. --- h/addrsbr.h    Tue May 12 15:01:15 1992
  12052. ***************
  12053. *** 31,37 ****
  12054.   
  12055.   #ifdef    MHMTS
  12056.       char   *m_aka;
  12057. ! #endif    MHMTS
  12058.   };
  12059.   
  12060.   
  12061. --- 31,37 ----
  12062.   
  12063.   #ifdef    MHMTS
  12064.       char   *m_aka;
  12065. ! #endif /* MHMTS */
  12066.   };
  12067.   
  12068.   
  12069. *** ../mh-6.7.2/h/aliasbr.h    Thu Oct 29 14:56:14 1987
  12070. --- h/aliasbr.h    Tue May 12 15:03:31 1992
  12071. ***************
  12072. *** 1,4 ****
  12073. --- 1,5 ----
  12074.   /* aliasbr.h - definitions for the aliasing system */
  12075. + /* $Id: aliasbr.h,v 1.2 1992/05/12 22:03:31 jromine Exp $ */
  12076.   
  12077.   
  12078.   extern char *AliasFile;        /* mh-alias(5) */
  12079. ***************
  12080. *** 30,42 ****
  12081.       char   *h_shell;        /* user's shell */
  12082.   #ifdef    BSD42
  12083.       int        h_ngrps;        /* number of groups this user belongs to */
  12084. ! #endif    BSD42
  12085.       struct home *h_next;    /* next home in list */
  12086.   };
  12087.   
  12088.   #ifndef    MMDFMTS
  12089.   struct  home *seek_home ();
  12090. ! #endif    MMDFMTS
  12091.   
  12092.   int     alias (), akvisible (), init_pw ();
  12093.   char   *akresult (), *akvalue (), *akerror ();
  12094. --- 31,43 ----
  12095.       char   *h_shell;        /* user's shell */
  12096.   #ifdef    BSD42
  12097.       int        h_ngrps;        /* number of groups this user belongs to */
  12098. ! #endif /* BSD42 */
  12099.       struct home *h_next;    /* next home in list */
  12100.   };
  12101.   
  12102.   #ifndef    MMDFMTS
  12103.   struct  home *seek_home ();
  12104. ! #endif /* MMDFMTS */
  12105.   
  12106.   int     alias (), akvisible (), init_pw ();
  12107.   char   *akresult (), *akvalue (), *akerror ();
  12108. *** ../mh-6.7.2/h/fmtcompile.h    Thu Jan 23 15:16:10 1992
  12109. --- h/fmtcompile.h    Tue Nov 17 09:50:36 1992
  12110. ***************
  12111. *** 1,4 ****
  12112. ! /* @(#)$Id: fmtcompile.h,v 1.8 1992/01/23 23:16:05 jromine Exp $ */
  12113.   
  12114.   /* Format Types */
  12115.   /* -------------*/
  12116. --- 1,4 ----
  12117. ! /* @(#)$Id: fmtcompile.h,v 1.9 1992/02/09 07:12:48 jromine Exp $ */
  12118.   
  12119.   /* Format Types */
  12120.   /* -------------*/
  12121. ***************
  12122. *** 29,105 ****
  12123.   #define FT_LV_PLUS_L    21    /* set "value" += literal */
  12124.   #define FT_LV_MINUS_L    22    /* set "value" -= literal */
  12125.   #define FT_LV_DIVIDE_L    23    /* set "value" to value / literal */
  12126. ! #define FT_LV_CHAR_LEFT 24    /* set "value" to char left in output */
  12127.   
  12128. ! #define FT_LS_MONTH    25    /* set "str" to tws month */
  12129. ! #define FT_LS_LMONTH    26    /* set "str" to long tws month */
  12130. ! #define FT_LS_ZONE    27    /* set "str" to tws timezone */
  12131. ! #define FT_LS_DAY    28    /* set "str" to tws weekday */
  12132. ! #define FT_LS_WEEKDAY    29    /* set "str" to long tws weekday */
  12133. ! #define FT_LS_822DATE    30    /* set "str" to 822 date str */
  12134. ! #define FT_LS_PRETTY    31    /* set "str" to pretty (?) date str */
  12135. ! #define FT_LV_SEC    32    /* set "value" to tws second */
  12136. ! #define FT_LV_MIN    33    /* set "value" to tws minute */
  12137. ! #define FT_LV_HOUR    34    /* set "value" to tws hour */
  12138. ! #define FT_LV_MDAY    35    /* set "value" to tws day of month */
  12139. ! #define FT_LV_MON    36    /* set "value" to tws month */
  12140. ! #define FT_LV_YEAR    37    /* set "value" to tws year */
  12141. ! #define FT_LV_YDAY    38    /* set "value" to tws day of year */
  12142. ! #define FT_LV_WDAY    39    /* set "value" to tws weekday */
  12143. ! #define FT_LV_ZONE    40    /* set "value" to tws timezone */
  12144. ! #define FT_LV_CLOCK    41    /* set "value" to tws clock */
  12145. ! #define FT_LV_RCLOCK    42    /* set "value" to now - tws clock */
  12146. ! #define FT_LV_DAYF    43    /* set "value" to tws day flag */
  12147. ! #define FT_LV_DST    44    /* set "value" to tws daylight savings flag */
  12148. ! #define FT_LV_ZONEF    45    /* set "value" to tws timezone flag */
  12149.   
  12150. ! #define FT_LS_PERS    46    /* set "str" to person part of addr */
  12151. ! #define FT_LS_MBOX    47    /* set "str" to mbox part of addr */
  12152. ! #define FT_LS_HOST    48    /* set "str" to host part of addr */
  12153. ! #define FT_LS_PATH    49    /* set "str" to route part of addr */
  12154. ! #define FT_LS_GNAME    50    /* set "str" to group part of addr */
  12155. ! #define FT_LS_NOTE    51    /* set "str" to comment part of addr */
  12156. ! #define FT_LS_ADDR    52    /* set "str" to mbox@host */
  12157. ! #define FT_LS_822ADDR    53    /* set "str" to 822 format addr */
  12158. ! #define FT_LS_FRIENDLY    54    /* set "str" to "friendly" format addr */
  12159. ! #define FT_LV_HOSTTYPE    55    /* set "value" to addr host type */
  12160. ! #define FT_LV_INGRPF    56    /* set "value" to addr in-group flag */
  12161. ! #define FT_LV_NOHOSTF    57    /* set "value" to addr no-host flag */
  12162.   
  12163.   /* Date Coercion */
  12164. ! #define FT_LOCALDATE    58    /* Coerce date to local timezone */
  12165. ! #define FT_GMTDATE    59    /* Coerce date to gmt */
  12166.   
  12167.   /* pre-format processing */
  12168. ! #define FT_PARSEDATE    60    /* parse comp into a date (tws) struct */
  12169. ! #define FT_PARSEADDR    61    /* parse comp into a mailaddr struct */
  12170. ! #define FT_FORMATADDR    62    /* let external routine format addr */
  12171. ! #define FT_MYMBOX    63    /* do "mymbox" test on comp */
  12172.   
  12173. ! /* misc. */
  12174. ! #ifdef    VAN
  12175. ! #define FT_ADDTOSEQ    64    /* add current msg to a sequence */
  12176. ! #endif
  12177.   
  12178.   /* conditionals & control flow (must be last) */
  12179. ! #define FT_SAVESTR    65    /* save current str reg */
  12180. ! #define FT_DONE        66    /* stop formatting */
  12181. ! #define FT_PAUSE    67    /* pause */
  12182. ! #define FT_NOP        68    /* nop */
  12183. ! #define FT_GOTO        69    /* (relative) goto */
  12184. ! #define FT_IF_S_NULL    70    /* test if "str" null */
  12185. ! #define FT_IF_S        71    /* test if "str" non-null */
  12186. ! #define FT_IF_V_EQ    72    /* test if "value" = literal */
  12187. ! #define FT_IF_V_NE    73    /* test if "value" != literal */
  12188. ! #define FT_IF_V_GT    74    /* test if "value" > literal */
  12189. ! #define FT_IF_MATCH    75    /* test if "str" contains literal */
  12190. ! #define FT_IF_AMATCH    76    /* test if "str" starts with literal */
  12191. ! #define FT_S_NULL    77    /* V = 1 if "str" null */
  12192. ! #define FT_S_NONNULL    78    /* V = 1 if "str" non-null */
  12193. ! #define FT_V_EQ        79    /* V = 1 if "value" = literal */
  12194. ! #define FT_V_NE        80    /* V = 1 if "value" != literal */
  12195. ! #define FT_V_GT        81    /* V = 1 if "value" > literal */
  12196. ! #define FT_V_MATCH    82    /* V = 1 if "str" contains literal */
  12197. ! #define FT_V_AMATCH    83    /* V = 1 if "str" starts with literal */
  12198.   
  12199. ! #define IF_FUNCS FT_S_NULL    /* start of "if" functions */
  12200. --- 29,104 ----
  12201.   #define FT_LV_PLUS_L    21    /* set "value" += literal */
  12202.   #define FT_LV_MINUS_L    22    /* set "value" -= literal */
  12203.   #define FT_LV_DIVIDE_L    23    /* set "value" to value / literal */
  12204. ! #define    FT_LV_MODULO_L    24    /* set "value" to value % literal */
  12205. ! #define FT_LV_CHAR_LEFT 25      /* set "value" to char left in output */
  12206.   
  12207. ! #define FT_LS_MONTH     26      /* set "str" to tws month */
  12208. ! #define FT_LS_LMONTH    27      /* set "str" to long tws month */
  12209. ! #define FT_LS_ZONE      28      /* set "str" to tws timezone */
  12210. ! #define FT_LS_DAY       29      /* set "str" to tws weekday */
  12211. ! #define FT_LS_WEEKDAY   30      /* set "str" to long tws weekday */
  12212. ! #define FT_LS_822DATE   31      /* set "str" to 822 date str */
  12213. ! #define FT_LS_PRETTY    32      /* set "str" to pretty (?) date str */
  12214. ! #define FT_LV_SEC       33      /* set "value" to tws second */
  12215. ! #define FT_LV_MIN       34      /* set "value" to tws minute */
  12216. ! #define FT_LV_HOUR      35      /* set "value" to tws hour */
  12217. ! #define FT_LV_MDAY      36      /* set "value" to tws day of month */
  12218. ! #define FT_LV_MON       37      /* set "value" to tws month */
  12219. ! #define FT_LV_YEAR      38      /* set "value" to tws year */
  12220. ! #define FT_LV_YDAY      39      /* set "value" to tws day of year */
  12221. ! #define FT_LV_WDAY      40      /* set "value" to tws weekday */
  12222. ! #define FT_LV_ZONE      41      /* set "value" to tws timezone */
  12223. ! #define FT_LV_CLOCK     42      /* set "value" to tws clock */
  12224. ! #define FT_LV_RCLOCK    43      /* set "value" to now - tws clock */
  12225. ! #define FT_LV_DAYF      44      /* set "value" to tws day flag */
  12226. ! #define FT_LV_DST       45      /* set "value" to tws daylight savings flag */
  12227. ! #define FT_LV_ZONEF     46      /* set "value" to tws timezone flag */
  12228.   
  12229. ! #define FT_LS_PERS      47      /* set "str" to person part of addr */
  12230. ! #define FT_LS_MBOX      48      /* set "str" to mbox part of addr */
  12231. ! #define FT_LS_HOST      49      /* set "str" to host part of addr */
  12232. ! #define FT_LS_PATH      50      /* set "str" to route part of addr */
  12233. ! #define FT_LS_GNAME     51      /* set "str" to group part of addr */
  12234. ! #define FT_LS_NOTE      52      /* set "str" to comment part of addr */
  12235. ! #define FT_LS_ADDR      53      /* set "str" to mbox@host */
  12236. ! #define FT_LS_822ADDR   54      /* set "str" to 822 format addr */
  12237. ! #define FT_LS_FRIENDLY  55      /* set "str" to "friendly" format addr */
  12238. ! #define FT_LV_HOSTTYPE  56      /* set "value" to addr host type */
  12239. ! #define FT_LV_INGRPF    57      /* set "value" to addr in-group flag */
  12240. ! #define FT_LV_NOHOSTF   58      /* set "value" to addr no-host flag */
  12241.   
  12242.   /* Date Coercion */
  12243. ! #define FT_LOCALDATE    59      /* Coerce date to local timezone */
  12244. ! #define FT_GMTDATE      60      /* Coerce date to gmt */
  12245.   
  12246.   /* pre-format processing */
  12247. ! #define FT_PARSEDATE    61      /* parse comp into a date (tws) struct */
  12248. ! #define FT_PARSEADDR    62      /* parse comp into a mailaddr struct */
  12249. ! #define FT_FORMATADDR   63      /* let external routine format addr */
  12250. ! #define FT_MYMBOX       64      /* do "mymbox" test on comp */
  12251.   
  12252. ! /* misc. */        /* ADDTOSEQ only works if you include "options LBL" */
  12253. ! #define FT_ADDTOSEQ     65      /* add current msg to a sequence */
  12254.   
  12255.   /* conditionals & control flow (must be last) */
  12256. ! #define FT_SAVESTR      66      /* save current str reg */
  12257. ! #define FT_DONE         67      /* stop formatting */
  12258. ! #define FT_PAUSE        68      /* pause */
  12259. ! #define FT_NOP          69      /* nop */
  12260. ! #define FT_GOTO         70      /* (relative) goto */
  12261. ! #define FT_IF_S_NULL    71      /* test if "str" null */
  12262. ! #define FT_IF_S         72      /* test if "str" non-null */
  12263. ! #define FT_IF_V_EQ      73      /* test if "value" = literal */
  12264. ! #define FT_IF_V_NE      74      /* test if "value" != literal */
  12265. ! #define FT_IF_V_GT      75      /* test if "value" > literal */
  12266. ! #define FT_IF_MATCH     76      /* test if "str" contains literal */
  12267. ! #define FT_IF_AMATCH    77      /* test if "str" starts with literal */
  12268. ! #define FT_S_NULL       78      /* V = 1 if "str" null */
  12269. ! #define FT_S_NONNULL    79      /* V = 1 if "str" non-null */
  12270. ! #define FT_V_EQ         80      /* V = 1 if "value" = literal */
  12271. ! #define FT_V_NE         81      /* V = 1 if "value" != literal */
  12272. ! #define FT_V_GT         82      /* V = 1 if "value" > literal */
  12273. ! #define FT_V_MATCH      83      /* V = 1 if "str" contains literal */
  12274. ! #define FT_V_AMATCH     84      /* V = 1 if "str" starts with literal */
  12275.   
  12276. ! #define IF_FUNCS FT_S_NULL      /* start of "if" functions */
  12277. *** ../mh-6.7.2/h/local.h    Thu Oct 29 14:56:18 1987
  12278. --- h/local.h    Thu Feb  6 09:37:46 1992
  12279. ***************
  12280. *** 1,19 ****
  12281.   /* local.h - fine the -lndir include file */
  12282.   
  12283.   #ifndef    BSD42
  12284.   #include <sys/types.h>
  12285. ! #else    BSD42
  12286.   #include <sys/param.h>
  12287. ! #endif    BSD42
  12288.   
  12289.   #ifndef    BSD42
  12290.   #ifndef NDIR
  12291. ! #include <dir.h>
  12292. ! #else    NDIR
  12293.   #include <ndir.h>
  12294. ! #endif  NDIR
  12295. ! #else    BSD42
  12296.   #include <sys/dir.h>
  12297. ! #endif    BSD42
  12298.   
  12299.   #include <sys/stat.h>
  12300. --- 1,24 ----
  12301.   /* local.h - fine the -lndir include file */
  12302. + /* @(#)$Id: local.h,v 1.3 1992/02/06 17:37:44 jromine Exp $ */
  12303.   
  12304.   #ifndef    BSD42
  12305.   #include <sys/types.h>
  12306. ! #else    /* BSD42 */
  12307.   #include <sys/param.h>
  12308. ! #endif
  12309.   
  12310.   #ifndef    BSD42
  12311.   #ifndef NDIR
  12312. ! #ifndef    SYS5DIR
  12313. ! #include <dir.h>        /* last choice */
  12314. ! #else    /* SYS5DIR */
  12315. ! #include <dirent.h>
  12316. ! #endif
  12317. ! #else    /* NDIR */
  12318.   #include <ndir.h>
  12319. ! #endif
  12320. ! #else    /* BSD42 */
  12321.   #include <sys/dir.h>
  12322. ! #endif
  12323.   
  12324.   #include <sys/stat.h>
  12325. *** /dev/null    Tue Dec 15 08:01:10 1992
  12326. --- h/md5.h    Mon Oct 26 08:38:59 1992
  12327. ***************
  12328. *** 0 ****
  12329. --- 1,71 ----
  12330. + /* @(#)$Id: md5.h,v 1.2 1992/10/26 16:38:50 jromine Exp $ */
  12331. + /* taken from RFC-1321/Appendices A.1/A.2 */
  12332. + /* GLOBAL.H - RSAREF types and constants
  12333. +  */
  12334. + /* PROTOTYPES should be set to one if and only if the compiler supports
  12335. +   function argument prototyping.
  12336. + The following makes PROTOTYPES default to 0 if it has not already
  12337. +   been defined with C compiler flags.
  12338. +  */
  12339. + #ifndef PROTOTYPES
  12340. + #define PROTOTYPES 0
  12341. + #endif
  12342. + /* POINTER defines a generic pointer type */
  12343. + typedef unsigned char *POINTER;
  12344. + /* UINT2 defines a two byte word */
  12345. + typedef unsigned short int UINT2;
  12346. + /* UINT4 defines a four byte word */
  12347. + typedef unsigned long int UINT4;
  12348. + /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
  12349. + If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
  12350. +   returns an empty list.
  12351. +  */
  12352. + #if PROTOTYPES
  12353. + #define PROTO_LIST(list) list
  12354. + #else
  12355. + #define PROTO_LIST(list) ()
  12356. + #endif
  12357. + /* MD5.H - header file for MD5C.C
  12358. +  */
  12359. + /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  12360. + rights reserved.
  12361. + License to copy and use this software is granted provided that it
  12362. + is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  12363. + Algorithm" in all material mentioning or referencing this software
  12364. + or this function.
  12365. + License is also granted to make and use derivative works provided
  12366. + that such works are identified as "derived from the RSA Data
  12367. + Security, Inc. MD5 Message-Digest Algorithm" in all material
  12368. + mentioning or referencing the derived work.
  12369. + RSA Data Security, Inc. makes no representations concerning either
  12370. + the merchantability of this software or the suitability of this
  12371. + software for any particular purpose. It is provided "as is"
  12372. + without express or implied warranty of any kind.
  12373. + These notices must be retained in any copies of any part of this
  12374. + documentation and/or software.
  12375. +  */
  12376. + /* MD5 context. */
  12377. + typedef struct {
  12378. +   UINT4 state[4];                                   /* state (ABCD) */
  12379. +   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
  12380. +   unsigned char buffer[64];                         /* input buffer */
  12381. + } MD5_CTX;
  12382. + void MD5Init PROTO_LIST ((MD5_CTX *));
  12383. + void MD5Update PROTO_LIST
  12384. +   ((MD5_CTX *, unsigned char *, unsigned int));
  12385. + void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
  12386. *** ../mh-6.7.2/h/mh.h    Thu Jan 23 16:03:59 1992
  12387. --- h/mh.h    Mon Dec 14 09:10:47 1992
  12388. ***************
  12389. *** 1,5 ****
  12390.   /* mh.h - main header file for all of MH */
  12391. ! /* @(#)$Id: mh.h,v 2.7 1992/01/24 00:03:50 jromine Exp $ */
  12392.   
  12393.   
  12394.   /* Well-used constants */
  12395. --- 1,5 ----
  12396.   /* mh.h - main header file for all of MH */
  12397. ! /* @(#)$Id: mh.h,v 2.18 1992/12/14 17:10:43 jromine Exp $ */
  12398.   
  12399.   
  12400.   /* Well-used constants */
  12401. ***************
  12402. *** 10,15 ****
  12403. --- 10,16 ----
  12404.   #define ALL        ""
  12405.   #define NULLCP        ((char *) 0)
  12406.   #define NULLVP        ((char **) 0)
  12407. + #define    Nbby        8    /* number of bits/byte */
  12408.   
  12409.   #define MAXARGS        1000    /* max arguments to exec */
  12410.   
  12411. ***************
  12412. *** 22,30 ****
  12413.   #endif
  12414.   #define DMAXFOLDER       4    /* typical number of digits */
  12415.   
  12416. ! #if !defined(BSD42) && !defined(BSD41A) && !defined(VMUNIX) && !defined(hpux)
  12417.   #define    vfork        fork
  12418. ! #endif    not BSD            /* how sad... */
  12419.   
  12420.   /*   */
  12421.   
  12422. --- 23,31 ----
  12423.   #endif
  12424.   #define DMAXFOLDER       4    /* typical number of digits */
  12425.   
  12426. ! #if (!defined(BSD42) && !defined(BSD41A) && !defined(VMUNIX) && !defined(hpux)) || defined(_AIX)
  12427.   #define    vfork        fork
  12428. ! #endif    /* not BSD */        /* how sad... */
  12429.   
  12430.   /*   */
  12431.   
  12432. ***************
  12433. *** 67,76 ****
  12434.   
  12435.       char   *foldpath;        /* Pathname of folder           */
  12436.   
  12437. !     char    msgflags;        /* Folder status bits           */
  12438.   #ifndef    MTR
  12439.       char    pad1[sizeof (int) - sizeof (char)];
  12440. ! #endif    not MTR
  12441.   #define READONLY  0x01        /*     No write access to folder */
  12442.   #define    SEQMOD      0x02        /*     folder's sequences modifed */
  12443.   #define    MHPATH      0x04        /*     mhpath-style folder handling */
  12444. --- 68,77 ----
  12445.   
  12446.       char   *foldpath;        /* Pathname of folder           */
  12447.   
  12448. !     int     msgflags;        /* Folder status bits           */
  12449.   #ifndef    MTR
  12450.       char    pad1[sizeof (int) - sizeof (char)];
  12451. ! #endif /* not MTR */
  12452.   #define READONLY  0x01        /*     No write access to folder */
  12453.   #define    SEQMOD      0x02        /*     folder's sequences modifed */
  12454.   #define    MHPATH      0x04        /*     mhpath-style folder handling */
  12455. ***************
  12456. *** 78,104 ****
  12457.   #define    MODIFIED  0x10        /*     msh in-core folder modified */
  12458.   #define    FBITS    "\020\01READONLY\02SEQMOD\03MHPATH\04OTHERS\05MODIFIED"
  12459.   
  12460. ! /* Note well: msgstats[] is a short, so we have 16 bits to work
  12461.       with.  The first 5 are for standard MH message flags,
  12462. !     this leaves us 11 for user-defined attributes.  Of these,
  12463. !     1 is reserved for future internal use, so this leaves
  12464. !     users 10.                        */
  12465. ! #define    NATTRS    10        /* could be 11, see above    */
  12466.       char   *msgattrs[NATTRS + 1];/* folder attributes        */
  12467. !     short   attrstats;        /* public=0/private=1        */
  12468. ! #ifndef    MTR
  12469. !     char    pad2[sizeof (int) - sizeof (short)];
  12470. ! #endif    not MTR
  12471.   
  12472.       int        lowoff;        /* low element in msgstats[] */
  12473.       int        hghoff;        /* hgh element in msgstats[] */
  12474.   
  12475.   #ifndef    MTR
  12476. !     short   msgstats[1];    /* msg status            */
  12477. ! #else    MTR
  12478. !     short  *msgbase;        /* msg base            */
  12479. !     short  *msgstats;        /* msg status            */
  12480. ! #endif    MTR
  12481.   #define EXISTS        0x0001    /*     exists            */
  12482.   #define DELETED        0x0002    /*     deleted            */
  12483.   #define SELECTED    0x0004    /*     selected for use        */
  12484. --- 79,102 ----
  12485.   #define    MODIFIED  0x10        /*     msh in-core folder modified */
  12486.   #define    FBITS    "\020\01READONLY\02SEQMOD\03MHPATH\04OTHERS\05MODIFIED"
  12487.   
  12488. ! /* Note well: msgstats[] is a int, so we have 16 or 32 bits to work
  12489.       with.  The first 5 are for standard MH message flags,
  12490. !     this leaves us 11 (or 27) for user-defined attributes.  Of
  12491. !     these, 1 is reserved for future internal use, so this leaves
  12492. !     users 10 (or 26).                    */
  12493. ! #define    NATTRS    ((sizeof(int)*Nbby)-6)         /*  see above    */
  12494.       char   *msgattrs[NATTRS + 1];/* folder attributes        */
  12495. !     int     attrstats;        /* public=0/private=1        */
  12496.   
  12497.       int        lowoff;        /* low element in msgstats[] */
  12498.       int        hghoff;        /* hgh element in msgstats[] */
  12499.   
  12500.   #ifndef    MTR
  12501. !     int     msgstats[1];    /* msg status            */
  12502. ! #else /* MTR */
  12503. !     int    *msgbase;        /* msg base            */
  12504. !     int    *msgstats;        /* msg status            */
  12505. ! #endif /* MTR */
  12506.   #define EXISTS        0x0001    /*     exists            */
  12507.   #define DELETED        0x0002    /*     deleted            */
  12508.   #define SELECTED    0x0004    /*     selected for use        */
  12509. ***************
  12510. *** 110,122 ****
  12511.   #define    MBITS    "\020\01EXISTS\02DELETED\03SELECTED\04NEW\05UNSEEN"
  12512.   
  12513.   #ifndef    MTR
  12514. ! #define    MSIZE(mp,lo,hi)    \
  12515.           ((unsigned) (sizeof *mp + ((hi) + 2) * sizeof *mp -> msgstats))
  12516. ! #else    MTR
  12517. ! #define    MSIZE(mp,lo,hi)    ((unsigned) sizeof *mp)
  12518. ! #define    MSIZEX(mp,lo,hi)    \
  12519.           ((unsigned) (((hi) - (lo) + 1) * sizeof *mp -> msgstats))
  12520. ! #endif    MTR
  12521.   };
  12522.   
  12523.   #define    NULLMP    ((struct msgs *) 0)
  12524. --- 108,120 ----
  12525.   #define    MBITS    "\020\01EXISTS\02DELETED\03SELECTED\04NEW\05UNSEEN"
  12526.   
  12527.   #ifndef    MTR
  12528. ! #define    MHSIZE(mp,lo,hi)    \
  12529.           ((unsigned) (sizeof *mp + ((hi) + 2) * sizeof *mp -> msgstats))
  12530. ! #else /* MTR */
  12531. ! #define    MHSIZE(mp,lo,hi)    ((unsigned) sizeof *mp)
  12532. ! #define    MHSIZEX(mp,lo,hi)    \
  12533.           ((unsigned) (((hi) - (lo) + 1) * sizeof *mp -> msgstats))
  12534. ! #endif /* MTR */
  12535.   };
  12536.   
  12537.   #define    NULLMP    ((struct msgs *) 0)
  12538. ***************
  12539. *** 158,168 ****
  12540.   
  12541.   #ifndef    LINK
  12542.   #define    LINK    "@"
  12543. ! #endif    not LINK
  12544.   
  12545.   #ifndef    SBACKUP
  12546.   #define    SBACKUP    ","
  12547. ! #endif    not SBACKUP
  12548.   
  12549.   
  12550.   #define OUTPUTLINELEN    72    /* default line length for headers */
  12551. --- 156,166 ----
  12552.   
  12553.   #ifndef    LINK
  12554.   #define    LINK    "@"
  12555. ! #endif /* not LINK */
  12556.   
  12557.   #ifndef    SBACKUP
  12558.   #define    SBACKUP    ","
  12559. ! #endif /* not SBACKUP */
  12560.   
  12561.   
  12562.   #define OUTPUTLINELEN    72    /* default line length for headers */
  12563. ***************
  12564. *** 187,192 ****
  12565. --- 185,191 ----
  12566.   extern char *fileproc;
  12567.   extern char *foldprot;
  12568.   extern char *forwcomps;
  12569. + extern char *inbox;
  12570.   extern char *incproc;
  12571.   extern char *installproc;
  12572.   extern char *lproc;
  12573. ***************
  12574. *** 230,236 ****
  12575.   #ifdef    OVERHEAD
  12576.   extern int  fd_def;
  12577.   extern int  fd_ctx;
  12578. ! #endif    OVERHEAD
  12579.   
  12580.   extern char *invo_name;        /* pgm invocation name */
  12581.   extern char *mypath;        /* user's $HOME */
  12582. --- 229,235 ----
  12583.   #ifdef    OVERHEAD
  12584.   extern int  fd_def;
  12585.   extern int  fd_ctx;
  12586. ! #endif /* OVERHEAD */
  12587.   
  12588.   extern char *invo_name;        /* pgm invocation name */
  12589.   extern char *mypath;        /* user's $HOME */
  12590. ***************
  12591. *** 284,289 ****
  12592. --- 283,289 ----
  12593.   char   *m_maildir ();
  12594.   char   *m_mailpath ();
  12595.   char   *m_name ();
  12596. + int    m_putenv ();
  12597.   void    m_readefs ();
  12598.   struct msgs *m_remsg ();
  12599.   void    m_replace ();
  12600. ***************
  12601. *** 310,316 ****
  12602.   int     pidstatus ();
  12603.   void    printsw ();
  12604.   void    push ();
  12605. - int    putenv ();
  12606.   char   *pwd ();
  12607.   char   *r1bindex ();
  12608.   int    refile ();
  12609. --- 310,315 ----
  12610. ***************
  12611. *** 331,352 ****
  12612.   
  12613.   #include "../h/strings.h"
  12614.   
  12615.   /* should be in <stdio.h> */
  12616.   
  12617. ! #if    !defined(SYS5) && !defined(ncr)
  12618.   typedef struct _iobuf  *FP;
  12619.   FP   popen ();
  12620. ! #else    SYS5
  12621.   #define    FP    FILE*
  12622. ! #endif    SYS5
  12623.   
  12624.   
  12625.   /* miscellaneous */
  12626.   
  12627. ! #if !defined(BSD42) && !defined(hpux) && !defined(ncr)
  12628.   #define    rename(f1,f2)    (link (f1, f2) != NOTOK ? unlink (f1) : NOTOK)
  12629. ! #endif    not BSD42
  12630.   
  12631.   #define    setsig(s,f)    if (signal (s, SIG_IGN) != SIG_IGN) \
  12632.                   (void) signal (s, f)
  12633. --- 330,350 ----
  12634.   
  12635.   #include "../h/strings.h"
  12636.   
  12637.   /* should be in <stdio.h> */
  12638.   
  12639. ! #if    !defined(SYS5) && !defined(ncr) && !defined(_AIX) && !defined(OSF1) && !defined(__convex__)
  12640.   typedef struct _iobuf  *FP;
  12641.   FP   popen ();
  12642. ! #else /* SYS5 */
  12643.   #define    FP    FILE*
  12644. ! #endif /* SYS5 */
  12645.   
  12646.   
  12647.   /* miscellaneous */
  12648.   
  12649. ! #if !defined(BSD42) && !defined(hpux) && !defined(ncr) && !defined(_AIX) && !defined(RENAME)
  12650.   #define    rename(f1,f2)    (link (f1, f2) != NOTOK ? unlink (f1) : NOTOK)
  12651. ! #endif    /* not BSD42 */
  12652.   
  12653.   #define    setsig(s,f)    if (signal (s, SIG_IGN) != SIG_IGN) \
  12654.                   (void) signal (s, f)
  12655. ***************
  12656. *** 353,366 ****
  12657.   #define    setsigx(i,s,f)    if ((i = signal (s, SIG_IGN)) != SIG_IGN) \
  12658.                   (void) signal (s, f)
  12659.   
  12660. - #ifndef    TYPESIG
  12661. - #ifdef    SUN40
  12662. - #define    TYPESIG    void
  12663. - #else    /* use old V7 default */
  12664. - #define    TYPESIG    int
  12665. - #endif
  12666. - #endif    not TYPESIG
  12667.   #if    defined(sun) && !defined(NFS)
  12668.   #define    NFS
  12669.   #endif
  12670. --- 351,356 ----
  12671. ***************
  12672. *** 367,370 ****
  12673. --- 357,365 ----
  12674.   
  12675.   #ifdef    NFS
  12676.   #define    ruserpass    _ruserpass
  12677. + #endif
  12678. + #if (defined(BSD44) || defined(SUN40) || defined(hpux) \
  12679. +     || defined(_AIX) || defined (sgi)) && !defined(UNISTD)
  12680. + #define       UNISTD
  12681.   #endif
  12682. *** /dev/null    Tue Dec 15 08:01:10 1992
  12683. --- h/mhn.h    Tue Oct 20 09:32:28 1992
  12684. ***************
  12685. *** 0 ****
  12686. --- 1,69 ----
  12687. + /* mhn.h - definitions for mhn & friends */
  12688. + /* @(#)$Id: mhn.h,v 1.2 1992/10/16 17:13:19 jromine Exp $ */
  12689. + #define    VRSN_FIELD    "MIME-Version"
  12690. + #define    VRSN_VALUE    "1.0"
  12691. + #define    XXX_FIELD_PRF    "Content-"
  12692. + #define    TYPE_FIELD    "Content-Type"
  12693. + #define    ENCODING_FIELD    "Content-Transfer-Encoding"
  12694. + #define    ID_FIELD    "Content-ID"
  12695. + #define    DESCR_FIELD    "Content-Description"
  12696. + #define    isatom(c) \
  12697. +         (!isspace (c) \
  12698. +         && !iscntrl (c) \
  12699. +         && (c) != '(' \
  12700. +         && (c) != ')' \
  12701. +         && (c) != '<' \
  12702. +         && (c) != '>' \
  12703. +         && (c) != '@' \
  12704. +         && (c) != ',' \
  12705. +         && (c) != ';' \
  12706. +         && (c) != ':' \
  12707. +         && (c) != '\\' \
  12708. +         && (c) != '"' \
  12709. +         && (c) != '.' \
  12710. +         && (c) != '[' \
  12711. +         && (c) != ']')
  12712. + #define    istoken(c) \
  12713. +         (!isspace (c) \
  12714. +         && !iscntrl (c) \
  12715. +         && (c) != '(' \
  12716. +         && (c) != ')' \
  12717. +         && (c) != '<' \
  12718. +         && (c) != '>' \
  12719. +         && (c) != '@' \
  12720. +         && (c) != ',' \
  12721. +         && (c) != ';' \
  12722. +         && (c) != ':' \
  12723. +         && (c) != '\\' \
  12724. +         && (c) != '"' \
  12725. +         && (c) != '/' \
  12726. +         && (c) != '[' \
  12727. +         && (c) != ']' \
  12728. +         && (c) != '?' \
  12729. +         && (c) != '=')
  12730. + /* MTR: removed now, since likely to go away in the future
  12731. +         && (c) != '.' \
  12732. +  */
  12733. + /*   */
  12734. + #define    CPERLIN    76
  12735. + #define    BPERLIN    (CPERLIN / 4)
  12736. + #define    LPERMSG    632
  12737. + #define    CPERMSG    (LPERMSG * CPERLIN)
  12738. + /*   */
  12739. + #if    defined(BSD42) || defined(SOCKETS)
  12740. + #define    FTP
  12741. + #endif
  12742. *** ../mh-6.7.2/h/mshsbr.h    Thu Apr  5 16:04:17 1990
  12743. --- h/mshsbr.h    Tue May 12 15:04:02 1992
  12744. ***************
  12745. *** 1,5 ****
  12746.   /* mshsbr.h - definitions for msh */
  12747. ! /* @(#)$Id: mshsbr.h,v 1.3 90/04/05 15:06:34 sources Exp $ */
  12748.   
  12749.   struct Cmd {
  12750.       char    line[BUFSIZ];
  12751. --- 1,5 ----
  12752.   /* mshsbr.h - definitions for msh */
  12753. ! /* @(#)$Id: mshsbr.h,v 1.5 1992/05/12 22:04:01 jromine Exp $ */
  12754.   
  12755.   struct Cmd {
  12756.       char    line[BUFSIZ];
  12757. ***************
  12758. *** 29,39 ****
  12759.       
  12760.       struct tws  m_tb;
  12761.   
  12762.       short   m_stats;
  12763.   #define CUR (1 << (FFATTRSLOT + NATTRS))
  12764.   #ifdef    BPOP
  12765.   #define    VIRTUAL    SELECT_EMPTY
  12766. ! #endif    BPOP
  12767.   };
  12768.   
  12769.   /*   */
  12770. --- 29,43 ----
  12771.       
  12772.       struct tws  m_tb;
  12773.   
  12774. +     short   m_flags;
  12775. + #define    MHNCHK    0x0001    /* did nontext check */
  12776. + #define    MHNYES    0x0002    /*   .. and known to be non-text */
  12777.       short   m_stats;
  12778.   #define CUR (1 << (FFATTRSLOT + NATTRS))
  12779.   #ifdef    BPOP
  12780.   #define    VIRTUAL    SELECT_EMPTY
  12781. ! #endif /* BPOP */
  12782.   };
  12783.   
  12784.   /*   */
  12785. ***************
  12786. *** 71,77 ****
  12787.   #ifdef    BSD42
  12788.   extern int  should_intr;    /* signal handler should interrupt call */
  12789.   extern jmp_buf sigenv;        /* the environment pointer */
  12790. ! #endif    BSD42
  12791.   
  12792.   
  12793.   long    lseek ();
  12794. --- 75,81 ----
  12795.   #ifdef    BSD42
  12796.   extern int  should_intr;    /* signal handler should interrupt call */
  12797.   extern jmp_buf sigenv;        /* the environment pointer */
  12798. ! #endif /* BSD42 */
  12799.   
  12800.   
  12801.   long    lseek ();
  12802. *** ../mh-6.7.2/h/rcvmail.h    Thu Oct 29 14:56:16 1987
  12803. --- h/rcvmail.h    Mon Dec 14 16:20:23 1992
  12804. ***************
  12805. *** 1,4 ****
  12806. --- 1,5 ----
  12807.   /* rcvmail.h - rcvmail hook definitions */
  12808. + /* @(#)$Id: rcvmail.h,v 1.3 1992/12/15 00:20:22 jromine Exp $ */
  12809.   
  12810.   #ifndef    MMDFMTS
  12811.   #include <ctype.h>
  12812. ***************
  12813. *** 7,25 ****
  12814.   #include <stdio.h>
  12815.   #include <sys/types.h>
  12816.   #include "../mts/sendmail/smail.h"
  12817. ! #else    MMDFMTS
  12818.   #include "../mts/mmdf/util.h"
  12819.   #include "../mts/mmdf/mmdf.h"
  12820. ! #endif    MMDFMTS
  12821.   
  12822.   
  12823.   #ifndef    MMDFI
  12824.   #define    RCV_MOK    0
  12825.   #define    RCV_MBX    1
  12826. ! #else    MMDFI
  12827.   #define    RCV_MOK    RP_MOK
  12828.   #define    RCV_MBX    RP_MECH
  12829. ! #endif    MMDFI
  12830.   
  12831.   
  12832.   #ifdef    NRTC            /* sigh */
  12833. --- 8,26 ----
  12834.   #include <stdio.h>
  12835.   #include <sys/types.h>
  12836.   #include "../mts/sendmail/smail.h"
  12837. ! #else    /* MMDFMTS */
  12838.   #include "../mts/mmdf/util.h"
  12839.   #include "../mts/mmdf/mmdf.h"
  12840. ! #endif    /* MMDFMTS */
  12841.   
  12842.   
  12843.   #ifndef    MMDFI
  12844.   #define    RCV_MOK    0
  12845.   #define    RCV_MBX    1
  12846. ! #else    /* MMDFI */
  12847.   #define    RCV_MOK    RP_MOK
  12848.   #define    RCV_MBX    RP_MECH
  12849. ! #endif    /* MMDFI */
  12850.   
  12851.   
  12852.   #ifdef    NRTC            /* sigh */
  12853. ***************
  12854. *** 28,31 ****
  12855.   
  12856.   #define    RCV_MOK    RP_MOK
  12857.   #define    RCV_MBX    RP_MECH
  12858. ! #endif    NRTC
  12859. --- 29,32 ----
  12860.   
  12861.   #define    RCV_MOK    RP_MOK
  12862.   #define    RCV_MBX    RP_MECH
  12863. ! #endif    /* NRTC */
  12864. *** ../mh-6.7.2/h/scansbr.h    Mon Dec  2 12:45:58 1991
  12865. --- h/scansbr.h    Tue Nov 10 09:27:14 1992
  12866. ***************
  12867. *** 1,5 ****
  12868.   /* scansbr.h - definitions for scan () */
  12869. ! /* $Header: /i1/db3/src/bs/mh-develop/mh-6.7-new/h/RCS/scansbr.h,v 1.2 1991/12/02 20:45:51 jromine Exp $ */
  12870.   
  12871.   extern char *scanl;
  12872.   
  12873. --- 1,5 ----
  12874.   /* scansbr.h - definitions for scan () */
  12875. ! /* $Id: scansbr.h,v 1.7 1992/11/10 17:27:11 jromine Exp $ */
  12876.   
  12877.   extern char *scanl;
  12878.   
  12879. ***************
  12880. *** 8,28 ****
  12881.   #define    SCNEOF    0        /* empty message */
  12882.   #define    SCNERR    (-1)        /* error message */
  12883.   #define    SCNNUM    (-2)        /* number out of range */
  12884.   
  12885.   
  12886.   #ifndef    UK
  12887.   #define    FORMAT    \
  12888. ! "%4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
  12889.   %02(mon{date})/%02(mday{date})%<{date} %|*%>\
  12890. ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%>  \
  12891.   %{subject}%<{body}<<%{body}>>%>\n"
  12892. ! #else UK
  12893.   #define    FORMAT    \
  12894. ! "%4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
  12895.   %02(mday{date})/%02(mon{date})%<{date} %|*%>\
  12896. ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%>  \
  12897.   %{subject}%<{body}<<%{body}>>%>\n"
  12898. ! #endif    UK
  12899.   
  12900.   #define    WIDTH    78
  12901.   
  12902. --- 8,29 ----
  12903.   #define    SCNEOF    0        /* empty message */
  12904.   #define    SCNERR    (-1)        /* error message */
  12905.   #define    SCNNUM    (-2)        /* number out of range */
  12906. + #define    SCNFAT    (-3)        /* fatal error */
  12907.   
  12908.   
  12909.   #ifndef    UK
  12910.   #define    FORMAT    \
  12911. ! "%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  12912.   %02(mon{date})/%02(mday{date})%<{date} %|*%>\
  12913. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  12914.   %{subject}%<{body}<<%{body}>>%>\n"
  12915. ! #else /* UK */
  12916.   #define    FORMAT    \
  12917. ! "%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  12918.   %02(mday{date})/%02(mon{date})%<{date} %|*%>\
  12919. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  12920.   %{subject}%<{body}<<%{body}>>%>\n"
  12921. ! #endif /* UK */
  12922.   
  12923.   #define    WIDTH    78
  12924.   
  12925. *** ../mh-6.7.2/h/strings.h    Thu Jan 23 15:16:49 1992
  12926. --- h/strings.h    Thu Nov 12 11:34:32 1992
  12927. ***************
  12928. *** 1,14 ****
  12929.   /* strings.h - define standard string functions */
  12930. ! /* @(#)$Id: strings.h,v 1.8 1992/01/23 23:16:46 jromine Exp $ */
  12931.   
  12932.   #ifndef    _STRINGS        /* once-only... */
  12933.   #define    _STRINGS
  12934.   
  12935.   #ifdef    SYS5
  12936.   #define    index    strchr
  12937.   #define    rindex    strrchr
  12938. ! #endif    SYS5
  12939.   
  12940.   char   *index ();
  12941.   char   *mktemp ();
  12942.   char   *rindex ();
  12943. --- 1,37 ----
  12944.   /* strings.h - define standard string functions */
  12945. ! /* @(#)$Id: strings.h,v 1.18 1992/11/12 19:34:05 jromine Exp $ */
  12946.   
  12947.   #ifndef    _STRINGS        /* once-only... */
  12948.   #define    _STRINGS
  12949.   
  12950. + #ifdef AUX
  12951. + #include <stdlib.h>
  12952. + #endif
  12953. + #ifdef _AIX
  12954. + #include <string.h>
  12955. + #include <stdlib.h>
  12956. + #define bcmp(b1,b2,length)    memcmp(b1, b2, length)
  12957. + #define    bcopy(b1,b2,length)    (void) memcpy (b2, b1, length)
  12958. + #define    bcpy(b1,b2,length)    memcmp (b1, b2, length)
  12959. + #define    bzero(b,length)        (void) memset (b, 0, length)
  12960. + #else /* _AIX */
  12961.   #ifdef    SYS5
  12962.   #define    index    strchr
  12963.   #define    rindex    strrchr
  12964. ! #endif /* SYS5 */
  12965.   
  12966. + #if    defined(BSD42) || defined(SVR4)
  12967. + #ifndef    SVR4
  12968. + #include <strings.h>
  12969. + #else
  12970. + #include <string.h>
  12971. + #include <stdlib.h>
  12972. + #endif
  12973. + #else    /* not BSD42 || SVR4 */
  12974.   char   *index ();
  12975.   char   *mktemp ();
  12976.   char   *rindex ();
  12977. ***************
  12978. *** 26,35 ****
  12979. --- 49,65 ----
  12980.   char   *strncat ();
  12981.   int     strncmp ();
  12982.   char   *strncpy ();
  12983. + #endif
  12984.   
  12985. + #ifndef    SVR4
  12986.   char   *getenv ();
  12987.   char   *calloc (), *malloc (), *realloc ();
  12988. + #endif    /* SVR4 */
  12989.   
  12990. + #if defined(__HIGHC__) || __GNUC__ == 2
  12991. + #define    bcopy(s,d,l)    memcpy(d,s,l)
  12992. + #endif
  12993.   #ifdef    SYS5
  12994.   #include <memory.h>
  12995.   #define bcmp(b1,b2,length)    memcmp(b1, b2, length)
  12996. ***************
  12997. *** 36,41 ****
  12998.   #define    bcopy(b1,b2,length)    (void) memcpy (b2, b1, length)
  12999.   #define    bcpy(b1,b2,length)    memcmp (b1, b2, length)
  13000.   #define    bzero(b,length)        (void) memset (b, 0, length)
  13001. ! #endif    SYS5
  13002. ! #endif    not _STRINGS
  13003. --- 66,71 ----
  13004.   #define    bcopy(b1,b2,length)    (void) memcpy (b2, b1, length)
  13005.   #define    bcpy(b1,b2,length)    memcmp (b1, b2, length)
  13006.   #define    bzero(b,length)        (void) memset (b, 0, length)
  13007. ! #endif /* SYS5 */
  13008. ! #endif    /* _AIX */
  13009. ! #endif /* not _STRINGS */
  13010. *** ../mh-6.7.2/miscellany/README    Fri Apr  6 11:24:13 1990
  13011. --- miscellany/README    Thu Dec  3 14:59:31 1992
  13012. ***************
  13013. *** 1,4 ****
  13014. ! miscellany/README $Revision: 1.3 $ $Date: 90/04/06 11:24:12 $
  13015.   
  13016. ! This directory contains some useful things for MH users and installers.
  13017.   
  13018. --- 1,5 ----
  13019. ! $Id: README,v 1.8 1992/11/20 17:05:30 jromine Exp $
  13020.   
  13021. ! The "miscellany/" directory contains some useful things for MH
  13022. ! users and installers.
  13023.   
  13024. ***************
  13025. *** 7,10 ****
  13026.   compress-4.0    MH Patches are sent out compressed.
  13027. ! less-5.0    "less is more" - a more/pg-like pager (v5)
  13028. ! patch-2.0.12    The famous patch program.  MH updates are sent as patches.
  13029.   
  13030. --- 8,11 ----
  13031.   compress-4.0    MH Patches are sent out compressed.
  13032. ! less-177    "less is more" - a more/pg-like pager (ver. 177)
  13033. ! patch-2.0.12u8    The famous patch program.  MH updates are sent as patches.
  13034.   
  13035. ***************
  13036. *** 12,13 ****
  13037. --- 13,15 ----
  13038.   
  13039. + audit        A perl package to parse and process messages 
  13040.   convert        Utilities for converting to/from other mailbox formats.
  13041. ***************
  13042. *** 14,22 ****
  13043.   libndir        The new directory routines for sites that don't have them.
  13044. ! mem        A reminder system.
  13045. ! mh-e        Brian Reid's MHE system
  13046. ! mhe        GNU Emacs interface to MH
  13047.   mtrenv        Some of Marshall T. Rose's MH environment
  13048.   netnews        Making netnews directories MH folders under 4BSD
  13049. ! rcvtrip        A script mhook.
  13050.   scripts        Some useful scripts
  13051.   sortf        Sort a folder by arbitrary fields (for MH6.6)
  13052. --- 16,28 ----
  13053.   libndir        The new directory routines for sites that don't have them.
  13054. ! mem        A reminder system using an appointment folder.
  13055. ! mh-e        GNU Emacs interface to MH (probably not the newest version)
  13056. ! mhe        Brian Reid's MHE system
  13057.   mtrenv        Some of Marshall T. Rose's MH environment
  13058. + multi-media    Multi-media mail as specified by RFC 1341 (MIME)
  13059.   netnews        Making netnews directories MH folders under 4BSD
  13060. ! rcvtrip        A script mhook which will annoy all posters of
  13061. !         mailing lists the user might be on.
  13062.   scripts        Some useful scripts
  13063. + sendmail    A replacement local mailer which uses the MMDF
  13064. +         maildrop format
  13065.   sortf        Sort a folder by arbitrary fields (for MH6.6)
  13066. *** /dev/null    Tue Dec 15 08:01:10 1992
  13067. --- miscellany/multi-media/READ-ME    Mon Oct 26 08:57:54 1992
  13068. ***************
  13069. *** 0 ****
  13070. --- 1,257 ----
  13071. + $Id: READ-ME,v 1.3 1992/10/26 16:57:51 jromine Exp $
  13072. + [ READ-ME - Wed Oct 21 15:35:57 1992 - multi-media MH for MH 6.7 - /mtr ]
  13073. +                    NOTICE
  13074. +      This package is openly available but is NOT in the public domain.
  13075. +      You are allowed and encouraged to take this software and use it for
  13076. +      any lawful purpose.  However, as a condition of use, you are required
  13077. +      to "hold harmless" all contributors.
  13078. +      Permission to use, copy, modify, and distribute this software and
  13079. +      its documentation for any purpose and without fee is hereby
  13080. +      granted, provided that this notice be retained unaltered,  and that
  13081. +      the name of any contributors shall not be used in advertising or
  13082. +      publicity pertaining to distribution of the software without
  13083. +      specific written prior permission.   No contributor makes any
  13084. +      representations about the suitability of this software for any
  13085. +      purpose.  It is provided "as is" without express or implied
  13086. +      warranty.
  13087. +     ALL CONTRIBUTORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  13088. +     SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  13089. +     AND FITNESS FOR THE PARTICULAR PURPOSE, TITLE, AND
  13090. +     NON-INFRINGEMENT.
  13091. +     IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY SPECIAL,
  13092. +     INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT, TORT, OR
  13093. +     OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH, THE
  13094. +     USE OR PERFORMANCE OF THIS SOFTWARE.
  13095. +      Following are sources of software for manipulating various MIME content
  13096. +      types.  The script support/general/bootmhn.sh (which is run when
  13097. +      you do "make inst-all") will look for these programs and create the
  13098. +      global mhn_defaults file accordingly.  Since this script will
  13099. +      look for the programs detailed below, you should do all of the
  13100. +      installation here prior to running "make inst-all".  Also, the
  13101. +      programs should be installed in either the MH library area
  13102. +      (e.g., /usr/local/lib/mh/) or in your $PATH.
  13103. +                 text/richtext
  13104. +      There are two programs for rendering text/richtext, rt2raw and
  13105. +      richtext. 
  13106. +      1. r2raw - a really dumb richtext interpreter
  13107. +      This is found in the MH distribution:
  13108. +     % cd miscellany/multi-media/misc/
  13109. +     % cc -o rt2raw rt2raw.c
  13110. +      and then copy rt2raw to your MH library area.
  13111. +      2. richtext - a termcap-based interpreter
  13112. +      This is found in the MetaMail distribution:    
  13113. +     host    thumper.bellcore.com
  13114. +     dir    pub/nsb/
  13115. +     file    mm.tar.Z
  13116. +     mode    binary
  13117. +      Now run these commands
  13118. +     % mkdir mm
  13119. +     % cd mm
  13120. +     % uncompress < ../mm.tar.Z | tar xvpf -
  13121. +     % cd richmail
  13122. +     % make richtext
  13123. +      and then copy richtext to your MH library area.
  13124. +                     image
  13125. +      There are several programs available for rending images: xv, pbmplus,
  13126. +      and jpeg.  To use any of these, you need to be running under the
  13127. +      X window system.  When bootmhn.sh runs, it will generate commands
  13128. +      for a monochrome monitor.  If you're running on a greyscale or
  13129. +      color monitor, you should change the commands accordingly.
  13130. +      1. xv version 2.11
  13131. +      There may be a more recent version by the time you read this file:
  13132. +     host    ftp.cis.upenn.edu
  13133. +     dir    pub/
  13134. +     file    xv-2.11.tar.Z
  13135. +     mode    binary
  13136. +      Read the installation instructions and install the xv binary
  13137. +      somewhere in your $PATH.
  13138. +      2. pbmplus
  13139. +      There may be a more recent version by the time you read this file:
  13140. +     host    ftp.uu.net
  13141. +     dir    pub/window-sys/X/contrib
  13142. +     file    pbmplus10dec91.tar.Z
  13143. +     mode    binary
  13144. +      3. JPEG
  13145. +      There may be a more recent version by the time you read this file:
  13146. +     host    ftp.uu.net
  13147. +     dir    graphics/jpeg/
  13148. +     file    jpegsrc.v3.tar.Z
  13149. +     mode    binary
  13150. +      Read the installation instructions and install the djpeg binary
  13151. +      somewhere in your $PATH.
  13152. +                     audio
  13153. +      This is platform dependent.  At present, only detailed information
  13154. +      for the SPARC and the HP 9000/710 is presented.
  13155. +      1. SPARC
  13156. +      The SPARC has a telephone-quality audio-chip and an internal
  13157. +      speaker.  If you want to record audio, you'll need to buy a
  13158. +      microphone.  For reasons not worth going into, most mic's don't
  13159. +      have enough gain, and you have to put the thing right next to your
  13160. +      lips.  However, Isaac Salzman of SMI suggests, and I concur, that
  13161. +      the best mic to get is SONY's ECM-K7.  This costs about US$50, but
  13162. +      is well worth it: you can put the mic on your desk and it will
  13163. +      still pick up your voice.
  13164. +      The "native" encoding for the audio-chip is 8-bit u-law sampled at
  13165. +      8000/second .  Prior to SunOS 4.1, audio files contained simply the
  13166. +      encoded audio.  However, in SunOS 4.1 or later, SMI introduced a
  13167. +      file format containing a header followed by the encoded audio.  For
  13168. +      now, we'll use the content type audio/basic to refer to the raw
  13169. +      audio, and the content type audio/x-next to refer to the file
  13170. +      format (NeXT developed the file format and SMI supports a subset of
  13171. +      it).  When dealing audio/basic, you simply cat to/from /dev/audio.
  13172. +      When dealing with audio/x-next, you can use the play and record
  13173. +      programs found in the /usr/demo/SOUND/ directory.
  13174. +      In addition, in OpenWindows 3.0 or later, SMI added support for a
  13175. +      compressed u-law encoding based on the CCITT G.721 ADPCM algorithm.
  13176. +      Before audio encoded in this fashion can be heard, it must be
  13177. +      converted back to 8-bit u-law.  Conversions to and from the two
  13178. +      encodings can be done with the adpcm_enc and adpcm_dec programs
  13179. +      found in the $OPENWINHOME/bin/xview/ directory.
  13180. +      If you are running something earlier than SunOS 4.1, I suggest that
  13181. +      you immediately get a copy of the raw2audio, play, and record
  13182. +      programs, so you can generate audio files.  The source is avilable
  13183. +      in the SunOS 4.1 Demos installation.  If you can't find these
  13184. +      programs, then when bootmhn.sh runs, it will just cat directly
  13185. +      to/from /dev/audio.
  13186. +      If you do have the raw2audio, play, and record programs (regardless
  13187. +      of the version of SunOS you're running), then apply some patches:
  13188. +     % (cd /usr/demo/SOUND; patch) < miscellany/multi-media/SPARC/SOUND.diff
  13189. +     % cd /usr/demo/SOUND
  13190. +     % make raw2audio
  13191. +      Be sure to put /usr/demo/SOUND in your $PATH so that bootmhn.sh can
  13192. +      find the programs there.  (Alternately, you could copy these
  13193. +      programs to another directory which is in your $PATH.)
  13194. +      You might also consider running /usr/demo/SOUND/x_gaintool, so you
  13195. +      can fiddle with the volume controls whenever you like.
  13196. +      2. HP 9000/710
  13197. +      The HP-Apollo 9000/710 workstation has a telephone-quality audio
  13198. +      chip and an internal speaker.  If you want to record audio, you'll
  13199. +      need to buy a microphone.  As with the SPARC, just about any
  13200. +      microphone with a standard mini jack will do.  Comments in the
  13201. +      preceding section that apply to selections of a microphone for the
  13202. +      SPARC probably also apply here. 
  13203. +      The audio programs that may be used with mhn -- player, splayer,
  13204. +      recorder, and srecorder -- are provided by HP in source form in the
  13205. +      directory /usr/audio/examples/.  The README file in that directory
  13206. +      documents the various audio utility programs for recording and
  13207. +      playing sounds.  Be sure to put /usr/audio/examples in your $PATH
  13208. +      so that bootmhn.sh can find the programs there.  (Alternately, you
  13209. +      could copy these programs to another directory which is in your
  13210. +      $PATH.)
  13211. +      Before any of the aforementioned programs can be used, the audio
  13212. +      device files must be created by running
  13213. +      /usr/audio/bin/make_audio_dev, and two daemons must be started:
  13214. +      /usr/etc/ncs/llbd and /usr/audio/bin/Aserver.  Refer to Audio(5)
  13215. +      for detailed, step by step instructions on how to do these things.
  13216. +      Alternatively, refer to the HP publication "Audio Users Guide"
  13217. +      (HP order number A1991-90609, November 1991 version).
  13218. +      The audio devices support several "native" encodings that vary as
  13219. +      to which of the audio device files is used: one of
  13220. +      /dev/audio[BEI][ALU], where E=external jack, I=internal speaker,
  13221. +      B=both; A=8-bit ALaw, L=16-bit linear, U=8-bit MuLaw.  It is
  13222. +      possible to "cat" a raw audio data file of the appropriate type to
  13223. +      or from one of these devices. For example, a SPARC .au file may be
  13224. +      played by running this command:
  13225. +         cat bark.au >/dev/audioIU
  13226. +      (You must create the audio device files before you can cat anything
  13227. +      to them; again, refer to Audio(5) for information on how to do this.)
  13228. +      There is, as of HP-UX 8.07, no supplied tool a la the SPARC's raw2audio
  13229. +      to add headers to audio data files that describe the audio data
  13230. +      encodings.  Rather than looking for headers in the sound data, the
  13231. +      audio tools rely on user-supplied information, such as file
  13232. +      extensions or command line options, to inform the tools about the
  13233. +      types and sampling rates of the audio data.
  13234. +      Audio file names have the form 
  13235. +         <file name>[["."<sample rate>]"."<type>]
  13236. +     where
  13237. +         <sample rate> ::= 1#DIGIT"000"/ 1#DIGIT"k"
  13238. +         <type> ::= "u" / "al" / "au" / "wav" / "snd" / "l8" / 
  13239. +                         "lo8" / "l16"
  13240. +     Mulaw                           u
  13241. +     Alaw                            al
  13242. +     Sun                             au
  13243. +     Microsoft RIFF Waveform         wav
  13244. +     Macintosh                       snd
  13245. +     Linear8                         l8
  13246. +     Linear8Offset                   lo8
  13247. +     Linear16                        l16
  13248. +     Examples: 
  13249. +         bark.au
  13250. +         bark.8000.au
  13251. +         bark.8k.au
  13252. +      As with the SPARC, the default sample rate is 8000 Hz.
  13253. +      The /usr/audio/bin/audio_demo program may be used to convert
  13254. +      manually among different sound types, as well as to play, to
  13255. +      record, and to edit the sounds.  Unfortunately, the audio_demo
  13256. +      program does not accept command line arguments, so it is not quite
  13257. +      as suitable for invocation from mhn as are the player and recorder
  13258. +      programs.
  13259. +      You might also consider running /usr/audio/examples/acontrol, so you
  13260. +      can fiddle with the volume controls whenever you like.
  13261. *** /dev/null    Tue Dec 15 08:01:10 1992
  13262. --- miscellany/multi-media/SPARC/SOUND.diff    Fri Feb 21 16:10:47 1992
  13263. ***************
  13264. *** 0 ****
  13265. --- 1,99 ----
  13266. + *** :raw2audio.c    Thu Oct 11 13:12:39 1990
  13267. + --- raw2audio.c    Fri Nov  1 17:20:00 1991
  13268. + ***************
  13269. + *** 23,29 ****
  13270. +   /* Local variables */
  13271. +   char *prog;
  13272. +   char prog_desc[] = "Convert raw data to audio file format";
  13273. + ! char prog_opts[] = "o:s:p:e:c:i:f?";    /* getopt() flags */
  13274. +   
  13275. +   char        *Stdin = "stdin";
  13276. +   char        *Stdout = "stdout";
  13277. + --- 23,29 ----
  13278. +   /* Local variables */
  13279. +   char *prog;
  13280. +   char prog_desc[] = "Convert raw data to audio file format";
  13281. + ! char prog_opts[] = "o:s:p:e:c:i:fF?";    /* getopt() flags */
  13282. +   
  13283. +   char        *Stdin = "stdin";
  13284. +   char        *Stdout = "stdout";
  13285. + ***************
  13286. + *** 34,39 ****
  13287. + --- 34,40 ----
  13288. +   char        *Info = NULL;        /* pointer to info data */
  13289. +   unsigned    Ilen = 0;        /* length of info data */
  13290. +   int        Force = 0;        /* rewrite file header, if present */
  13291. + + int        Strip = 0;        /* strip header */
  13292. +   unsigned    Offset = 0;        /* byte offset into raw data */
  13293. +   Audio_hdr    Hdr;            /* audio header structure */
  13294. +   char        *ofile;            /* output temporary file name */
  13295. + ***************
  13296. + *** 139,144 ****
  13297. + --- 140,148 ----
  13298. +           Info = optarg;        /* set information string */
  13299. +           Ilen = strlen(Info);
  13300. +           break;
  13301. + +     case 'F':
  13302. + +         Strip++;        /* strip header */
  13303. + +         /* and fall... */
  13304. +       case 'f':
  13305. +           Force++;        /* force header rewrite */
  13306. +           break;
  13307. + ***************
  13308. + *** 161,166 ****
  13309. + --- 165,174 ----
  13310. +               if (Hdr.bytes_per_unit < 4)
  13311. +                   err++;
  13312. +               break;
  13313. + +         case AUDIO_ENCODING_ADPCM:
  13314. + +             if (Hdr.bytes_per_unit != 1)
  13315. + +                 err++;
  13316. + +             break;
  13317. +           }
  13318. +           if (err > 0) {
  13319. +               Error(stderr, "%s: encoding/precision mismatch\n",
  13320. + ***************
  13321. + *** 317,322 ****
  13322. + --- 325,331 ----
  13323. +           /* Write the audio file header first. */
  13324. +           if (Hdr.data_size != AUDIO_UNKNOWN_SIZE)
  13325. +               Hdr.data_size -= Offset;
  13326. + +         if (Strip) goto copydata;
  13327. +           err = audio_write_filehdr(ofd, &Hdr, Info, Ilen);
  13328. +           if (err != AUDIO_SUCCESS)
  13329. +               goto writeerror;
  13330. + ***************
  13331. + *** 435,443 ****
  13332. +           *dst = AUDIO_ENCODING_LINEAR;
  13333. +       else if (strncmp(str, "FLOAT", i) == 0)
  13334. +           *dst = AUDIO_ENCODING_FLOAT;
  13335. +       else {
  13336. +           Error(stderr,
  13337. + !             "%s: encoding must be one of: ULAW, LINEAR, FLOAT\n", prog);
  13338. +           return (1);
  13339. +       }
  13340. +       return (0);
  13341. + --- 444,454 ----
  13342. +           *dst = AUDIO_ENCODING_LINEAR;
  13343. +       else if (strncmp(str, "FLOAT", i) == 0)
  13344. +           *dst = AUDIO_ENCODING_FLOAT;
  13345. + +     else if (strncmp(str, "ADPCM", i) == 0)
  13346. + +         *dst = AUDIO_ENCODING_ADPCM;
  13347. +       else {
  13348. +           Error(stderr,
  13349. + !             "%s: encoding must be one of: ULAW, LINEAR, FLOAT, ADPCM\n", prog);
  13350. +           return (1);
  13351. +       }
  13352. +       return (0);
  13353. + *** multimedia/:audio_hdr.h    Thu Oct 11 13:12:45 1990
  13354. + --- multimedia/audio_hdr.h    Fri Nov  1 09:47:12 1991
  13355. + ***************
  13356. + *** 72,77 ****
  13357. + --- 72,78 ----
  13358. +   #define    AUDIO_ENCODING_ALAW    (2)    /* ISDN A-law */
  13359. +   #define    AUDIO_ENCODING_LINEAR    (3)    /* PCM 2's-complement (0-center) */
  13360. +   #define    AUDIO_ENCODING_FLOAT    (4)    /* IEEE float (-1. <-> +1.) */
  13361. + + #define    AUDIO_ENCODING_ADPCM    (23)    /* CCITT G.721*/
  13362. +   
  13363. +   
  13364. +   /* Value used for indeterminate size (e.g., data passed through a pipe) */
  13365. *** /dev/null    Tue Dec 15 08:01:10 1992
  13366. --- miscellany/multi-media/misc/rt2raw.c    Fri Feb 21 16:10:49 1992
  13367. ***************
  13368. *** 0 ****
  13369. --- 1,55 ----
  13370. + /* taken straight from the MIME specification, to use with multi-media MH, do:
  13371. +     mhn-show-text/richtext: rt2raw < %f | fmt -78 | more
  13372. +    in your .mhn_profile.
  13373. +    Note that MTR doesn't use this program.  He uses NB's richtext program
  13374. +    instead (the one that comes with MetaMail).  See RICHTEXT.setup for the
  13375. +    details.
  13376. +  */
  13377. + #include <stdio.h>
  13378. + #include <ctype.h>
  13379. + main() {
  13380. +     int c, i;
  13381. +     char token[50];
  13382. +     while((c = getc(stdin)) != EOF) {
  13383. +         if (c == '<') {
  13384. +             for (i=0; (c = getc(stdin)) != '>'
  13385. +                       && c != EOF; ++i) {
  13386. +                 token[i] = isupper(c) ? tolower(c) : c;
  13387. +             }
  13388. +             if (c == EOF) break;
  13389. +             token[i] = NULL;
  13390. +             if (!strcmp(token, "lt")) {
  13391. +                 putc('<', stdout);
  13392. +             } else if (!strcmp(token, "nl")) {
  13393. +                 putc('\n', stdout);
  13394. +             } else if (!strcmp(token, "/paragraph")) {
  13395. +                 puts("\n\n", stdout);
  13396. +             } else if (!strcmp(token, "comment")) {
  13397. +                 int commct=1;
  13398. +                 while (commct > 0) {
  13399. +                     while ((c = getc(stdin)) != '<'
  13400. +                      && c != EOF) ;
  13401. +                     if (c == EOF) break;
  13402. +                     for (i=0; (c = getc(stdin)) != '>'
  13403. +                        && c != EOF; ++i) {
  13404. +                         token[i] = isupper(c) ?
  13405. +                          tolower(c) : c;
  13406. +                     }
  13407. +                     if (c== EOF) break;
  13408. +                     token[i] = NULL;
  13409. +                     if (!strcmp(token, "/comment")) --commct;
  13410. +                     if (!strcmp(token, "comment"))  ++commct;
  13411. +                 }
  13412. +             } /* Ignore all other tokens */
  13413. +         } else if (c != '\n') {
  13414. +             putc(c, stdout);
  13415. +         }
  13416. +     }
  13417. +     putc('\n', stdout); /* for good measure */
  13418. +     exit(0);
  13419. + }
  13420. *** /dev/null    Tue Dec 15 08:01:10 1992
  13421. --- miscellany/multi-media/misc/showtimes.sh    Mon Apr 27 14:39:57 1992
  13422. ***************
  13423. *** 0 ****
  13424. --- 1,94 ----
  13425. + : run this script through /bin/sh
  13426. + C=/tmp/st$$.ctx L=/tmp/st$$.lst P=/tmp/st$$.prf
  13427. + trap "rm -f $C $L $P" 0 1 2 3 13 15
  13428. + echo "MH-Sequences:" > $P
  13429. + cat ${MH-$HOME/.mh_profile} >> $P
  13430. + MH="$P" export MH
  13431. + cp ${MHCONTEXT-`mhpath +`/context} $C
  13432. + MHCONTEXT="$C" export MHCONTEXT
  13433. + F= M= N=
  13434. + for A in $*
  13435. + do
  13436. +     case "$A" in
  13437. +     -file)    if [ ! -z "$F" -o ! -z "$M" ]; then
  13438. +             echo "st: do not mix files and messages" 1>&2
  13439. +             exit 1
  13440. +         fi
  13441. +         F="-file" N="file "
  13442. +         ;;
  13443. +     +*|@*)    if [ ! -z "$F" ]; then
  13444. +             echo "st: only one folder at a time" 1>&2
  13445. +             exit 1
  13446. +         fi
  13447. +         F="$A" N="$F:"
  13448. +         ;;
  13449. +     *)    if [ ! -z "$M" ]; then
  13450. +             echo "st: only one message at a time" 1>&2
  13451. +             exit 1
  13452. +         fi
  13453. +         M="$A"
  13454. +         ;;
  13455. +     esac
  13456. + done
  13457. + if mhn -list $F $M > $L; then
  13458. +     if [ -z "$F" ]; then
  13459. +     N="+`folder -fast`:"
  13460. +     fi
  13461. +     if [ -z "$M" ]; then
  13462. +     M="`mhpath cur`"
  13463. +     M="`basename $M`"
  13464. +     fi
  13465. + else
  13466. +     exit 1;
  13467. + fi
  13468. + cat $L
  13469. + X=0 Y=0
  13470. + Z=`xdpyinfo | fgrep 'dimensions:'| awk '{ print $2; }'`
  13471. + XX="`echo $Z | sed -e 's%\(.*\)x.*%\1%'`"
  13472. + YY="`echo $Z | sed -e 's%.*x\(.*\)%\1%'`"
  13473. + XX="`expr \( $XX \* 5 \) / 12`"
  13474. + YY="`expr \( $YY \* 2 \) / 3`"
  13475. + echo -n "st> "
  13476. + while read A; do
  13477. +     case "$A" in
  13478. +     [123456789]*|0)
  13479. +         O="`fgrep \ $A\  $L | sed -e 's%..........................................\(.*\)%\1%'`"
  13480. +         if [ -z "$O" ]; then
  13481. +             echo "no such part number"
  13482. +         else
  13483. +             xterm -geometry =80x20+$X+$Y \
  13484. +             -title "$O (part $A of $N$M)" -e \
  13485. +             mhn -nolist -show -part "$A" $F $M &
  13486. +             X=`expr $X + 90` Y=`expr $Y + 60`
  13487. +             if [ $X -gt $XX ]; then
  13488. +                 X=0
  13489. +             fi
  13490. +             if [ $Y -gt $YY ]; then
  13491. +                 Y=0
  13492. +             fi
  13493. +         fi
  13494. +         ;;
  13495. +     list|"")
  13496. +         cat $L
  13497. +         ;;
  13498. +     *)    echo "enter part number to display"
  13499. +         ;;
  13500. +     esac
  13501. +     echo -n "st> "
  13502. + done
  13503. + echo ""
  13504. + exit 0
  13505. *** /dev/null    Tue Dec 15 08:01:10 1992
  13506. --- miscellany/multi-media/profiles/mhn_defaults    Thu Dec 10 14:45:28 1992
  13507. ***************
  13508. *** 0 ****
  13509. --- 1,12 ----
  13510. + mhn-compose-audio/basic: /usr/demo/SOUND/record | /usr/demo/SOUND/raw2audio -F
  13511. + mhn-compose-audio/x-next: /usr/demo/SOUND/record | /usr/openwin/bin/adpcm_enc
  13512. + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
  13513. + mhn-show-application/PostScript: %plpr -Pps
  13514. + mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | play
  13515. + mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
  13516. + mhn-show-image: %pxv -geometry =-0+0 %f
  13517. + mhn-show-text/richtext: %p/usr/local/lib/mh/richtext -p %F
  13518. + mhn-store-application/PostScript: %m%P.ps
  13519. + mhn-store-audio/basic: | /usr/demo/SOUND/raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
  13520. + mhn-store-audio/x-next: %m%P.au
  13521. + mhn-store-text: %m%P.txt
  13522. *** /dev/null    Tue Dec 15 08:01:10 1992
  13523. --- miscellany/multi-media/profiles/mtr.mh_profile    Sat Oct 17 22:40:07 1992
  13524. ***************
  13525. *** 0 ****
  13526. --- 1,59 ----
  13527. + Path:        mhbox
  13528. + Alternate-Mailboxes: mrose*
  13529. + Draft-Folder:    drafts
  13530. + Folder-Protect:    700
  13531. + Msg-Protect:    600
  13532. + Sequence-Negation: ^
  13533. + lproc:        show
  13534. + moreproc:    less
  13535. + mshproc:    msh
  13536. + showproc:    mhl
  13537. + ex-next:    zz
  13538. + prompter-next:    vi
  13539. + da-server:    wp2.psi.net
  13540. + ali:        -alias aliases
  13541. + anno:        -inplace
  13542. + bomb:        -annotate -fcc +outbox -form repl.bomb -inplace -nocc all
  13543. +             -whatnow push
  13544. + burst:        -inplace
  13545. + dist:        -annotate -form dist.comps -inplace
  13546. + forw:        -annotate -editor rapid -form forw.comps -inplace -mime
  13547. + fym:        -annotate -fcc +outbox -form repl.fym -inplace -nocc all
  13548. +             -whatnow push -filter mhl.fym
  13549. + hnfy:        -annotate -fcc +outbox -form repl.hnfy -inplace -nocc all
  13550. +             -whatnow push
  13551. + inc:        -apop -form scan.time
  13552. + msgchk:        -apop
  13553. + msh:        -scan -topcur
  13554. + next:        -noheader
  13555. + ok:        -annotate -fcc +outbox -form repl.ok -inplace -nocc all
  13556. +             -whatnow push
  13557. + oops:        -annotate -fcc +outbox -form repl.oops -inplace -nocc all
  13558. +             -whatnow push
  13559. + pick:        -sequence select -list
  13560. + pop:        -rpop -form scan.timely
  13561. + popi:        -apop
  13562. + popf:        -pop
  13563. + prev:        -noheader
  13564. + push:        -alias aliases -forward -mime -msgid -push -verbose
  13565. + pushf:        -push
  13566. + rapid:        -rapid
  13567. + repl:        -annotate -fcc +outbox -inplace -cc all -nocc me
  13568. + scan:        -form scan.time
  13569. + send:        -alias aliases -mime -msgid -verbose
  13570. + sendf:        -alias aliases -mime -msgid -verbose -draftfolder +drafts
  13571. + show:        -noheader
  13572. + ssortm:        -limit 0 -textfield subject
  13573. + thanks:        -annotate -fcc +outbox -form repl.thanks -inplace -nocc all
  13574. +             -whatnow push
  13575. + whom:        -alias aliases
  13576. + vmh:        -novmhproc
  13577. + yl:        -annotate -fcc +outbox -form repl.yl -inplace -nocc all
  13578. +             -whatnow push
  13579. + Split-Delay:    180
  13580. + automhnproc:    mhn
  13581. + mhnproc:    mhn
  13582. + mcomp:        -editor rapid -form comp.mhn
  13583. + mhn:        -list -nomoreproc
  13584. + mhn-cache:    /tmp
  13585. + mhn-storage:    /tmp
  13586. *** /dev/null    Tue Dec 15 08:01:10 1992
  13587. --- miscellany/multi-media/profiles/mtr.mhn_profile.openwindows    Sat Oct 17 22:39:44 1992
  13588. ***************
  13589. *** 0 ****
  13590. --- 1 ----
  13591. + mhn-show-application/PostScript: pageview -
  13592. No differences encountered
  13593. *** /dev/null    Tue Dec 15 08:01:10 1992
  13594. --- miscellany/sendmail/README    Thu Nov  5 19:40:56 1992
  13595. ***************
  13596. *** 0 ****
  13597. --- 1,8 ----
  13598. + # miscellany/sendmail/README
  13599. + spooler.c    -- a replacement local delivery mailer for sendmail that
  13600. +         was written by Terry West (terry@rand.org) and has been
  13601. +         in use there for many years now.
  13602. +         It writes maildrops in the MMDF/MH ctrl/A format so you
  13603. +         can avoid munging "From " lines.
  13604. *** /dev/null    Tue Dec 15 08:01:10 1992
  13605. --- miscellany/sendmail/spooler.c    Thu Nov  5 14:28:52 1992
  13606. ***************
  13607. *** 0 ****
  13608. --- 1,204 ----
  13609. + /* spooler.c --  MH style mailer to write to /usr/spool/mail/<user>
  13610. +  *
  13611. +  *     Mlocal, P=/etc/spooler,  F=lsDFSmn, S=10, R=20, A=spooler $u
  13612. +  */
  13613. + #define FLOCK   /* uses flock() if defined, lockf() otherwise. */
  13614. + #include <stdio.h>
  13615. + #include <sys/types.h>
  13616. + #include <sys/stat.h>
  13617. + #include <sys/file.h>
  13618. + #include <pwd.h>
  13619. + #include "sysexits.h"
  13620. + #define SPOOLDIR "/usr/spool/mail"
  13621. + char *delim = "\1\1\1\1\n";
  13622. + char *ME = "/etc/spooler";
  13623. + FILE *mboxopen();
  13624. + FILE *fp_in;
  13625. + main( argc, argv )
  13626. + int argc;
  13627. + char **argv;
  13628. + {
  13629. +     register int rc, anyerrs;
  13630. +     char tmpfile[100];
  13631. +     if( *++argv == NULL ) {
  13632. +     fprintf( stderr, "%s: no recipients.\n", ME );
  13633. +     exit( EX_USAGE );
  13634. +     }
  13635. +     if( argc == 2 ) {           /* single recipient, don't need tmp copy */
  13636. +     fp_in = stdin;
  13637. +     rc = localmail( *argv );
  13638. +     }
  13639. +     else {
  13640. +     if(( rc = copyfile( tmpfile )) == 0 ) {     /* sets fp_in */
  13641. +         for( anyerrs = 0; *argv; argv++ ) {
  13642. +         rewind( fp_in );
  13643. +         if(( rc = localmail( *argv )))
  13644. +             anyerrs++;
  13645. +         }
  13646. +         if( !anyerrs )
  13647. +         unlink( tmpfile );
  13648. +     }
  13649. +     }
  13650. +     exit( rc );
  13651. + }
  13652. + localmail( user )
  13653. + char   *user;
  13654. + {
  13655. +     register FILE *fp;
  13656. +     register int count, n;
  13657. +     register char buf[BUFSIZ];
  13658. +     register char mailbox[BUFSIZ];
  13659. +     register struct stat sb;
  13660. +     sprintf( mailbox, "%s/%s", SPOOLDIR, user );
  13661. +     if( stat( mailbox, &sb ) == -1 ) {
  13662. +     if( create_mbox( mailbox, user ))
  13663. +         return(EX_TEMPFAIL);
  13664. +     }
  13665. +     if(( fp = mboxopen( mailbox )) == 0 )
  13666. +     return(EX_TEMPFAIL);
  13667. +     fwrite( delim, sizeof(char), strlen(delim), fp );
  13668. +     while(( count = fread( buf, sizeof(char), BUFSIZ, fp_in))) {
  13669. +     n = fwrite( buf, sizeof(char), count, fp );
  13670. +     if( n != count ) {
  13671. +         fprintf( stderr, "%s write error: %d read, %d written\n",
  13672. +         ME, count, n );
  13673. +         mboxclose(fp);
  13674. +         return(-1);
  13675. +     }
  13676. +     }
  13677. +     fwrite( delim, sizeof(char), strlen(delim), fp );
  13678. +     mboxclose(fp);
  13679. +     return(0);
  13680. + }
  13681. + create_mbox( mbox, user )
  13682. + register char *mbox, *user;
  13683. + {
  13684. +     register int fd;
  13685. +     register struct passwd *pw;
  13686. +     if(( fd = creat( mbox, 0600 )) == -1 )
  13687. +     return -1;
  13688. +     if(( pw = getpwnam( user )) != NULL ) {
  13689. +     fchown( fd, pw->pw_uid, pw->pw_gid );
  13690. +     }
  13691. +     close( fd );
  13692. +     return 0;
  13693. + }
  13694. + FILE *
  13695. + mboxopen( mailbox )
  13696. + register char *mailbox;
  13697. + {
  13698. +     register FILE *fp;
  13699. +     register int i;
  13700. +     if(( fp = fopen( mailbox, "a" )) == NULL ) {
  13701. +     fprintf( stderr, "%s:  Can't open %s for appending\n", ME, mailbox );
  13702. +     return(0);
  13703. +     }
  13704. +     /* lock the mailbox */
  13705. + #define NLOCKTRYS 20        /* almost a 2 min. wait should be enough even */
  13706. +                 /* after a long vacation */
  13707. +     for( i = 0; i < NLOCKTRYS; i++ ) {
  13708. + #ifdef FLOCK
  13709. +     if( flock( fileno(fp), LOCK_EX | LOCK_NB ) == 0)    /* got it ok */
  13710. + #else
  13711. +     if( lockf( fileno(fp), F_TLOCK, 0) == 0 )
  13712. + #endif FLOCK
  13713. +         break;
  13714. +     /* fprintf(stderr, "can't lock, sleeping 5 sec...\n"); */
  13715. +     sleep(5);
  13716. +     }
  13717. + /*
  13718. +  *  If lockf worked perfectly (ie, rpc.lockd didn't die) this would be
  13719. +  *  just fine.
  13720. +  */
  13721. + #ifdef DontDoThis
  13722. +     if( i == NLOCKTRYS ) {
  13723. +     fprintf( stderr, "%s:  Can't lock %s\n", ME, mailbox);
  13724. +     return(0);
  13725. +     }
  13726. + #endif
  13727. +     fseek( fp, 0, 2 );
  13728. +     return(fp);
  13729. + }
  13730. + mboxclose(fp)
  13731. + FILE *fp;
  13732. + {
  13733. + /*todo: unlockit.  --not really necessary */
  13734. +     fclose(fp);
  13735. + }
  13736. + /*
  13737. +  *  collect stdin to a tmp file
  13738. +  */
  13739. + copyfile( tmpfile )
  13740. + register char *tmpfile;
  13741. + {
  13742. +     struct stat sb;
  13743. +     register int pid, count, n;
  13744. +     register char buf[BUFSIZ];
  13745. +     register FILE *fp;
  13746. +     pid = getpid();
  13747. +     while( 1 ) {
  13748. +     sprintf( tmpfile, "/tmp/spooler.%05d", pid );
  13749. +     if( stat( tmpfile, &sb ) == -1 )    /* ok, this file doesn't exist */
  13750. +         break;
  13751. +     pid++;
  13752. +     }
  13753. +     if(( fp = fopen( tmpfile, "w" )) == NULL ) {
  13754. +     fprintf( stderr, "%s:  Can't open %s\n", ME, tmpfile );
  13755. +     return(EX_TEMPFAIL);
  13756. +     }
  13757. +     while(( count = fread( buf, sizeof(char), BUFSIZ, stdin ))) {
  13758. +     n = fwrite( buf, sizeof(char), count, fp );
  13759. +     if( n != count ) {
  13760. +         fprintf( stderr, "%s: copyfile, write error: %d read, %d written\n",
  13761. +         ME, count, n );
  13762. +         fclose(fp);
  13763. +         return(-1);
  13764. +     }
  13765. +     }
  13766. +     fp_in = freopen( tmpfile, "r", fp );
  13767. +     if( fp_in == NULL ) {
  13768. +     fprintf( stderr, "%s: freopen on %s failed\n", ME, tmpfile );
  13769. +     return(-1);
  13770. +     }
  13771. +     return(0);
  13772. + }
  13773. *** ../mh-6.7.2/mts/mh/hosts.c    Mon Feb  5 14:51:53 1990
  13774. --- mts/mh/hosts.c    Mon Dec 14 16:20:24 1992
  13775. ***************
  13776. *** 1,4 ****
  13777. --- 1,7 ----
  13778.   /* hosts.c - find out the official name of a host */
  13779. + #ifndef    lint
  13780. + static char ident[] = "@(#)$Id: hosts.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  13781. + #endif    /* lint */
  13782.   
  13783.   /* LINTLIBRARY */
  13784.   
  13785. ***************
  13786. *** 5,11 ****
  13787.   #undef    NETWORK
  13788.   #if    defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
  13789.   #define    NETWORK
  13790. ! #endif    not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS))
  13791.   
  13792.   #include "../h/strings.h"
  13793.   #include <stdio.h>
  13794. --- 8,14 ----
  13795.   #undef    NETWORK
  13796.   #if    defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
  13797.   #define    NETWORK
  13798. ! #endif    /* not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS)) */
  13799.   
  13800.   #include "../h/strings.h"
  13801.   #include <stdio.h>
  13802. ***************
  13803. *** 13,19 ****
  13804.   #include <ctype.h>
  13805.   #if    defined(BSD42) || defined(SOCKETS)
  13806.   #include <netdb.h>
  13807. ! #endif    BSD42 or SOCKETS
  13808.   
  13809.   
  13810.   #define    NOTOK    (-1)
  13811. --- 16,22 ----
  13812.   #include <ctype.h>
  13813.   #if    defined(BSD42) || defined(SOCKETS)
  13814.   #include <netdb.h>
  13815. ! #endif    /* BSD42 or SOCKETS */
  13816.   
  13817.   
  13818.   #define    NOTOK    (-1)
  13819. ***************
  13820. *** 30,41 ****
  13821.       static char buffer[BUFSIZ];
  13822.   #if    defined(BSD42) || defined(SOCKETS)
  13823.       register struct hostent *hp;
  13824. ! #endif    BSD42 or SOCKETS
  13825. ! #endif    NETWORK
  13826.   
  13827.       for (p = name, q = site; *p; p++, q++)
  13828.       *q = isupper (*p) ? tolower (*p) : *p;
  13829. !     *q = NULL;
  13830.       q = site;
  13831.   
  13832.       if (uleq (LocalName (), site))
  13833. --- 33,44 ----
  13834.       static char buffer[BUFSIZ];
  13835.   #if    defined(BSD42) || defined(SOCKETS)
  13836.       register struct hostent *hp;
  13837. ! #endif    /* BSD42 or SOCKETS */
  13838. ! #endif    /* NETWORK */
  13839.   
  13840.       for (p = name, q = site; *p; p++, q++)
  13841.       *q = isupper (*p) ? tolower (*p) : *p;
  13842. !     *q = 0;
  13843.       q = site;
  13844.   
  13845.       if (uleq (LocalName (), site))
  13846. ***************
  13847. *** 47,59 ****
  13848.       free (q);
  13849.       return buffer;
  13850.       }
  13851. ! #endif    BSD41A
  13852.   #if    defined(BSD42) || defined(SOCKETS)
  13853.       if (hp = gethostbyname (q)) {
  13854.       (void) strcpy (buffer, hp -> h_name);
  13855.       return buffer;
  13856.       }
  13857. ! #endif    BSD42 or SOCKETS
  13858.   
  13859.       return NULL;
  13860.   }
  13861. --- 50,62 ----
  13862.       free (q);
  13863.       return buffer;
  13864.       }
  13865. ! #endif    /* BSD41A */
  13866.   #if    defined(BSD42) || defined(SOCKETS)
  13867.       if (hp = gethostbyname (q)) {
  13868.       (void) strcpy (buffer, hp -> h_name);
  13869.       return buffer;
  13870.       }
  13871. ! #endif    /* BSD42 or SOCKETS */
  13872.   
  13873.       return NULL;
  13874.   }
  13875. *** ../mh-6.7.2/mts/mmdf/hosts.c    Thu Oct 29 14:58:02 1987
  13876. --- mts/mmdf/hosts.c    Mon Dec 14 16:20:24 1992
  13877. ***************
  13878. *** 1,4 ****
  13879. --- 1,7 ----
  13880.   /* hosts.c - use MMDF to get hostname information */
  13881. + #ifndef    lint
  13882. + static char ident[] = "@(#)$Id: hosts.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  13883. + #endif    /* lint */
  13884.   
  13885.   /* LINTLIBRARY */
  13886.   
  13887. ***************
  13888. *** 8,14 ****
  13889.   #include "ch.h"
  13890.   #ifdef    MMDFII
  13891.   #include "dm.h"
  13892. ! #endif    MMDFII
  13893.   #include "../zotnet/mts.h"
  13894.   
  13895.   /* 
  13896. --- 11,17 ----
  13897.   #include "ch.h"
  13898.   #ifdef    MMDFII
  13899.   #include "dm.h"
  13900. ! #endif    /* MMDFII */
  13901.   #include "../zotnet/mts.h"
  13902.   
  13903.   /* 
  13904. ***************
  13905. *** 36,42 ****
  13906.           : ch == (Chan *) NULL ? LocalName ()
  13907.           : buffer);
  13908.   }
  13909. ! #else    MMDFII
  13910.   
  13911.   extern char *invo_name;
  13912.   
  13913. --- 39,45 ----
  13914.           : ch == (Chan *) NULL ? LocalName ()
  13915.           : buffer);
  13916.   }
  13917. ! #else    /* MMDFII */
  13918.   
  13919.   extern char *invo_name;
  13920.   
  13921. ***************
  13922. *** 64,67 ****
  13923.           return buffer;
  13924.       }
  13925.   }
  13926. ! #endif    MMDFII
  13927. --- 67,70 ----
  13928.           return buffer;
  13929.       }
  13930.   }
  13931. ! #endif    /* MMDFII */
  13932. *** ../mh-6.7.2/mts/sendmail/hosts.c    Tue Feb  6 12:58:03 1990
  13933. --- mts/sendmail/hosts.c    Mon Dec 14 16:20:25 1992
  13934. ***************
  13935. *** 1,4 ****
  13936. --- 1,7 ----
  13937.   /* hosts.c - find out the official name of a host */
  13938. + #ifndef    lint
  13939. + static char ident[] = "@(#)$Id: hosts.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  13940. + #endif    /* lint */
  13941.   
  13942.   /* LINTLIBRARY */
  13943.   
  13944. ***************
  13945. *** 14,20 ****
  13946.   #include <ctype.h>
  13947.   #if    defined(BSD42) || defined(SOCKETS)
  13948.   #include <netdb.h>
  13949. ! #endif    BSD42 or SOCKETS
  13950.   
  13951.   
  13952.   #define    NOTOK    (-1)
  13953. --- 17,23 ----
  13954.   #include <ctype.h>
  13955.   #if    defined(BSD42) || defined(SOCKETS)
  13956.   #include <netdb.h>
  13957. ! #endif    /* BSD42 or SOCKETS */
  13958.   
  13959.   
  13960.   #define    NOTOK    (-1)
  13961. ***************
  13962. *** 40,46 ****
  13963.               site[BUFSIZ];
  13964.   #if    defined(BSD42) || defined(SOCKETS)
  13965.       register struct hostent *hp;
  13966. ! #endif    BSD42 or SOCKETS
  13967.       static char buffer[BUFSIZ];
  13968.       register char **r;
  13969.       register struct host   *h;
  13970. --- 43,49 ----
  13971.               site[BUFSIZ];
  13972.   #if    defined(BSD42) || defined(SOCKETS)
  13973.       register struct hostent *hp;
  13974. ! #endif    /* BSD42 or SOCKETS */
  13975.       static char buffer[BUFSIZ];
  13976.       register char **r;
  13977.       register struct host   *h;
  13978. ***************
  13979. *** 47,53 ****
  13980.   
  13981.       for (p = name, q = site; *p; p++, q++)
  13982.       *q = isupper (*p) ? tolower (*p) : *p;
  13983. !     *q = NULL;
  13984.       q = site;
  13985.   
  13986.       if (uleq (LocalName (), site))
  13987. --- 50,56 ----
  13988.   
  13989.       for (p = name, q = site; *p; p++, q++)
  13990.       *q = isupper (*p) ? tolower (*p) : *p;
  13991. !     *q = 0;
  13992.       q = site;
  13993.   
  13994.       if (uleq (LocalName (), site))
  13995. ***************
  13996. *** 59,65 ****
  13997.       free (q);
  13998.       return buffer;
  13999.       }
  14000. ! #endif    BSD41A
  14001.   #if    defined(BSD42) || defined(SOCKETS)
  14002.   #ifndef    BIND
  14003.       sethostent (1);
  14004. --- 62,68 ----
  14005.       free (q);
  14006.       return buffer;
  14007.       }
  14008. ! #endif    /* BSD41A */
  14009.   #if    defined(BSD42) || defined(SOCKETS)
  14010.   #ifndef    BIND
  14011.       sethostent (1);
  14012. ***************
  14013. *** 68,74 ****
  14014.       (void) strcpy (buffer, hp -> h_name);
  14015.       return buffer;
  14016.       }
  14017. ! #endif    BSD42 or SOCKETS
  14018.   
  14019.       if (hosts.h_name || init_hs ())
  14020.       for (h = hosts.h_next; h; h = h -> h_next)
  14021. --- 71,77 ----
  14022.       (void) strcpy (buffer, hp -> h_name);
  14023.       return buffer;
  14024.       }
  14025. ! #endif    /* BSD42 or SOCKETS */
  14026.   
  14027.       if (hosts.h_name || init_hs ())
  14028.       for (h = hosts.h_next; h; h = h -> h_next)
  14029. ***************
  14030. *** 108,134 ****
  14031.       h = &hosts;
  14032.       while (fgets (buffer, sizeof buffer, fp) != NULL) {
  14033.       if (cp = index (buffer, '#'))
  14034. !         *cp = NULL;
  14035.       if (cp = index (buffer, '\n'))
  14036. !         *cp = NULL;
  14037.       for (cp = buffer; *cp; cp++)
  14038.           if (isspace (*cp))
  14039.           *cp = ' ';
  14040.       for (cp = buffer; isspace (*cp); cp++)
  14041.           continue;
  14042. !     if (*cp == NULL)
  14043.           continue;
  14044.   
  14045.       q = aliases;
  14046.       if (cp = index (dp = cp, ' ')) {
  14047. !         *cp = NULL;
  14048.           for (cp++; *cp; cp++) {
  14049.           while (isspace (*cp))
  14050.               cp++;
  14051. !         if (*cp == NULL)
  14052.               break;
  14053.           if (cp = index (*q++ = cp, ' '))
  14054. !             *cp = NULL;
  14055.           else
  14056.               break;
  14057.           if (q >= aliases + NALIASES)
  14058. --- 111,137 ----
  14059.       h = &hosts;
  14060.       while (fgets (buffer, sizeof buffer, fp) != NULL) {
  14061.       if (cp = index (buffer, '#'))
  14062. !         *cp = 0;
  14063.       if (cp = index (buffer, '\n'))
  14064. !         *cp = 0;
  14065.       for (cp = buffer; *cp; cp++)
  14066.           if (isspace (*cp))
  14067.           *cp = ' ';
  14068.       for (cp = buffer; isspace (*cp); cp++)
  14069.           continue;
  14070. !     if (*cp == 0)
  14071.           continue;
  14072.   
  14073.       q = aliases;
  14074.       if (cp = index (dp = cp, ' ')) {
  14075. !         *cp = 0;
  14076.           for (cp++; *cp; cp++) {
  14077.           while (isspace (*cp))
  14078.               cp++;
  14079. !         if (*cp == 0)
  14080.               break;
  14081.           if (cp = index (*q++ = cp, ' '))
  14082. !             *cp = 0;
  14083.           else
  14084.               break;
  14085.           if (q >= aliases + NALIASES)
  14086. ***************
  14087. *** 136,142 ****
  14088.           }
  14089.       }
  14090.   
  14091. !     *q = NULL;
  14092.   
  14093.       h -> h_next = (struct host *) calloc (1, sizeof *h);
  14094.       h = h -> h_next;
  14095. --- 139,145 ----
  14096.           }
  14097.       }
  14098.   
  14099. !     *q = 0;
  14100.   
  14101.       h -> h_next = (struct host *) calloc (1, sizeof *h);
  14102.       h = h -> h_next;
  14103. ***************
  14104. *** 145,151 ****
  14105.           (char **) calloc ((unsigned) (q - aliases + 1), sizeof *q);
  14106.       for (q = aliases; *q; q++)
  14107.           *r++ = getcpy (*q);
  14108. !     *r = NULL;
  14109.       }
  14110.   
  14111.       (void) fclose (fp);
  14112. --- 148,154 ----
  14113.           (char **) calloc ((unsigned) (q - aliases + 1), sizeof *q);
  14114.       for (q = aliases; *q; q++)
  14115.           *r++ = getcpy (*q);
  14116. !     *r = 0;
  14117.       }
  14118.   
  14119.       (void) fclose (fp);
  14120. *** ../mh-6.7.2/mts/sendmail/smail.c    Tue Feb  6 12:58:45 1990
  14121. --- mts/sendmail/smail.c    Mon Nov  9 10:19:43 1992
  14122. ***************
  14123. *** 1,4 ****
  14124. --- 1,7 ----
  14125.   /* smail.c - MH interface to SendMail/SMTP */
  14126. + #ifndef    lint
  14127. + static char ident[] = "@(#)$Id: smail.c,v 1.21 1992/11/09 18:19:32 jromine Exp $";
  14128. + #endif
  14129.   
  14130.   /* LINTLIBRARY */
  14131.   
  14132. ***************
  14133. *** 13,19 ****
  14134.      expect SendMail to be well-behaved and not hang on us.  The only time
  14135.      I've ever seen Sendmail hang was with a bogus configuration file...
  14136.    */
  14137. ! #endif    BSD42
  14138.   #ifdef    SENDMAILBUG
  14139.   /*
  14140.    * It appears that some versions of Sendmail will return Code 451
  14141. --- 16,22 ----
  14142.      expect SendMail to be well-behaved and not hang on us.  The only time
  14143.      I've ever seen Sendmail hang was with a bogus configuration file...
  14144.    */
  14145. ! #endif    /* BSD42 */
  14146.   #ifdef    SENDMAILBUG
  14147.   /*
  14148.    * It appears that some versions of Sendmail will return Code 451
  14149. ***************
  14150. *** 25,44 ****
  14151.    */
  14152.   #ifndef    SENDMAIL
  14153.   #undef        SENDMAILBUG
  14154. ! #endif    not SENDMAIL
  14155. ! #endif    SENDMAILBUG
  14156.   
  14157.   #ifdef hpux    
  14158.   /* HP-UX has this capability. It also handles (some) signals. */
  14159.   #define BSD42 
  14160. ! #endif hpux
  14161.   
  14162.   #if    !defined(BSD42) && !defined(SOCKETS)
  14163.   #undef    SMTP
  14164. ! #endif    not BSD42 and not SOCKETS
  14165.   #ifdef    SMTP
  14166.   #undef    SENDMAIL
  14167. ! #endif    SMTP
  14168.   
  14169.   
  14170.   #include "../h/strings.h"
  14171. --- 28,47 ----
  14172.    */
  14173.   #ifndef    SENDMAIL
  14174.   #undef        SENDMAILBUG
  14175. ! #endif    /* not SENDMAIL */
  14176. ! #endif    /* SENDMAILBUG */
  14177.   
  14178.   #ifdef hpux    
  14179.   /* HP-UX has this capability. It also handles (some) signals. */
  14180.   #define BSD42 
  14181. ! #endif /* hpux */
  14182.   
  14183.   #if    !defined(BSD42) && !defined(SOCKETS)
  14184.   #undef    SMTP
  14185. ! #endif    /* not BSD42 and not SOCKETS */
  14186.   #ifdef    SMTP
  14187.   #undef    SENDMAIL
  14188. ! #endif    /* SMTP */
  14189.   
  14190.   
  14191.   #include "../h/strings.h"
  14192. ***************
  14193. *** 48,53 ****
  14194. --- 51,60 ----
  14195.   #include <ctype.h>
  14196.   #include <signal.h>
  14197.   
  14198. + #ifndef    TYPESIG
  14199. + #define    TYPESIG    int
  14200. + #endif
  14201.   #define    NOTOK    (-1)
  14202.   #define    OK    0
  14203.   #define    DONE    1
  14204. ***************
  14205. *** 60,65 ****
  14206. --- 67,73 ----
  14207.   #define    min(a,b)    ((a) < (b) ? (a) : (b))
  14208.   
  14209.   
  14210. +         /* these codes must all be different! */
  14211.   #define    SM_OPEN     90      /* Changed from 30 in case of nameserver flakiness */
  14212.   #define    SM_HELO     20
  14213.   #define    SM_RSET     15
  14214. ***************
  14215. *** 66,85 ****
  14216.   #define    SM_MAIL     40
  14217.   #define    SM_RCPT    120
  14218.   #define    SM_DATA     20
  14219. ! #define    SM_TEXT    120
  14220. ! #define    SM_DOT    120
  14221. ! #define    SM_QUIT     20
  14222.   #define    SM_CLOS     10
  14223.   
  14224.   /*   */
  14225.   
  14226. ! static int    alrmser ();
  14227.   
  14228.   static int  sm_addrs = 0;
  14229.   static int  sm_alarmed = 0;
  14230.   #ifndef    SMTP
  14231.   static int  sm_child = NOTOK;
  14232. ! #endif    not SMTP
  14233.   static int  sm_debug = 0;
  14234.   static int  sm_nl = TRUE;
  14235.   static int  sm_verbose = 0;
  14236. --- 74,93 ----
  14237.   #define    SM_MAIL     40
  14238.   #define    SM_RCPT    120
  14239.   #define    SM_DATA     20
  14240. ! #define    SM_TEXT    150
  14241. ! #define    SM_DOT    180
  14242. ! #define    SM_QUIT     30
  14243.   #define    SM_CLOS     10
  14244.   
  14245.   /*   */
  14246.   
  14247. ! static TYPESIG    alrmser ();
  14248.   
  14249.   static int  sm_addrs = 0;
  14250.   static int  sm_alarmed = 0;
  14251.   #ifndef    SMTP
  14252.   static int  sm_child = NOTOK;
  14253. ! #endif    /* not SMTP */
  14254.   static int  sm_debug = 0;
  14255.   static int  sm_nl = TRUE;
  14256.   static int  sm_verbose = 0;
  14257. ***************
  14258. *** 87,92 ****
  14259. --- 95,105 ----
  14260.   static  FILE * sm_rfp = NULL;
  14261.   static  FILE * sm_wfp = NULL;
  14262.   
  14263. + #ifdef    MPOP
  14264. + static    int  sm_ispool = 0;
  14265. + static    char sm_tmpfil[BUFSIZ];
  14266. + #endif /* MPOP */
  14267.   static char *sm_noreply = "No reply text given";
  14268.   static char *sm_moreply = "; ";
  14269.   
  14270. ***************
  14271. *** 99,104 ****
  14272. --- 112,123 ----
  14273.   static int    rclient(), sm_ierror(), smtalk(), sm_wrecord(), sm_wstream();
  14274.   static int    sm_werror(), smhear(), sm_rrecord(), sm_rerror();
  14275.   
  14276. + #ifdef    MPOP
  14277. + extern    int    errno, sys_nerr;
  14278. + extern    char   *sys_errlist[];
  14279. + extern    char  **brkstring (), **copyip (), *getcpy ();
  14280. + #endif
  14281.   /*   */
  14282.   
  14283.   #ifndef    SMTP
  14284. ***************
  14285. *** 120,130 ****
  14286. --- 139,157 ----
  14287.       char   *vec[15];
  14288.   
  14289.       if (watch)
  14290. + #ifndef    SUN40
  14291.       verbose = TRUE;
  14292. + #else    /* to show the transaction, -watch must imply -snoop */
  14293. +     debug = verbose = TRUE;
  14294. + #endif
  14295.       sm_verbose = verbose;
  14296.       sm_debug = debug;
  14297.       if (sm_rfp != NULL && sm_wfp != NULL)
  14298.       return RP_OK;
  14299. + #ifdef ZMAILER
  14300. +     if (client == NULL || *client == '\0')
  14301. +     client = "localhost";
  14302. + #endif
  14303.   
  14304.       if (pipe (pdi) == NOTOK)
  14305.       return sm_ierror ("no pipes");
  14306. ***************
  14307. *** 157,162 ****
  14308. --- 184,190 ----
  14309.           vecp = 0;
  14310.           vec[vecp++] = r1bindex (sendmail, '/');
  14311.           vec[vecp++] = "-bs";
  14312. + #ifndef ZMAILER
  14313.           vec[vecp++] = watch ? "-odi" : "-odb";
  14314.           vec[vecp++] = "-oem";
  14315.           vec[vecp++] = "-om";
  14316. ***************
  14317. *** 163,169 ****
  14318.   #ifndef    RAND
  14319.           if (verbose)
  14320.           vec[vecp++] = "-ov";
  14321. ! #endif    not RAND
  14322.           vec[vecp++] = NULL;
  14323.   
  14324.           (void) setgid (getegid ());
  14325. --- 191,198 ----
  14326.   #ifndef    RAND
  14327.           if (verbose)
  14328.           vec[vecp++] = "-ov";
  14329. ! #endif    /* not RAND */
  14330. ! #endif    /* not ZMAILER */
  14331.           vec[vecp++] = NULL;
  14332.   
  14333.           (void) setgid (getegid ());
  14334. ***************
  14335. *** 198,203 ****
  14336. --- 227,237 ----
  14337.               (void) sm_end (NOTOK);
  14338.               return RP_RPLY;
  14339.           }
  14340. + #ifndef ZMAILER
  14341. +         (void) smtalk(SM_HELO, "ONEX");
  14342. + #endif /* not ZMAILER */
  14343. +         if (watch)
  14344. +         (void) smtalk(SM_HELO, "VERB on");
  14345.           if (client && *client)
  14346.           switch (smtalk (SM_HELO, "HELO %s", client)) {
  14347.               case 250: 
  14348. ***************
  14349. *** 210,216 ****
  14350.           return RP_OK;
  14351.       }
  14352.   }
  14353. ! #else    SMTP
  14354.   
  14355.   /*   */
  14356.   
  14357. --- 244,250 ----
  14358.           return RP_OK;
  14359.       }
  14360.   }
  14361. ! #else    /* SMTP */
  14362.   
  14363.   /*   */
  14364.   
  14365. ***************
  14366. *** 226,243 ****
  14367.                       sd2;
  14368.   
  14369.       if (watch)
  14370.       verbose = TRUE;
  14371.       sm_verbose = verbose;
  14372.       sm_debug = debug;
  14373.       if (sm_rfp != NULL && sm_wfp != NULL)
  14374.       return RP_OK;
  14375. ! #if    !defined(SENDMTS) || defined(MMDFII)
  14376. !     if (client == NULL || *client == NULL)
  14377.       client = LocalName ();
  14378.   #endif
  14379.   
  14380.       if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
  14381.       return RP_BHST;
  14382.       if ((sd2 = dup (sd1)) == NOTOK) {
  14383.       (void) close (sd1);
  14384.       return sm_ierror ("unable to dup");
  14385. --- 260,308 ----
  14386.                       sd2;
  14387.   
  14388.       if (watch)
  14389. + #if defined(SUN40) && !defined(MMDFII)
  14390. +     debug = verbose = TRUE;
  14391. + #else
  14392.       verbose = TRUE;
  14393. + #endif
  14394.       sm_verbose = verbose;
  14395.       sm_debug = debug;
  14396.       if (sm_rfp != NULL && sm_wfp != NULL)
  14397.       return RP_OK;
  14398. ! #ifdef ZMAILER
  14399. !     if (client == NULL || *client == '\0')
  14400. !     client = "localhost";
  14401. ! #else
  14402. ! #if    !defined(SENDMTS) || defined(MMDFII) || defined(SVR4)
  14403. !     if (client == NULL || *client == 0)
  14404.       client = LocalName ();
  14405.   #endif
  14406. + #endif    /* ZMAILER */
  14407.   
  14408. + #ifdef    MPOP
  14409. +     if (sm_ispool)
  14410. +     goto all_done;
  14411. + #endif
  14412.       if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
  14413.       return RP_BHST;
  14414. + #ifdef    MPOP
  14415. +     if (sm_ispool) {
  14416. +     if (sm_rfp) {
  14417. +         (void) alarm (SM_CLOS);
  14418. +         (void) fclose (sm_rfp);
  14419. +         (void) alarm (0);
  14420. +         sm_rfp = NULL;
  14421. +     }
  14422. +     if ((sm_wfp = fdopen (sd1, "w")) == NULL) {
  14423. +         (void) unlink (sm_tmpfil);
  14424. +         (void) close (sd1);
  14425. +         return sm_ierror ("unable to fdopen");
  14426. +     }
  14427. + all_done: ;
  14428. +     sm_reply.text[sm_reply.length = 0] = NULL;
  14429. +     return (sm_reply.code = RP_OK);
  14430. +     }
  14431. + #endif /* MPOP */
  14432.       if ((sd2 = dup (sd1)) == NOTOK) {
  14433.       (void) close (sd1);
  14434.       return sm_ierror ("unable to dup");
  14435. ***************
  14436. *** 265,270 ****
  14437. --- 330,342 ----
  14438.           (void) sm_end (NOTOK);
  14439.           return RP_RPLY;
  14440.       }
  14441. + #if    !(defined(ZMAILER) || defined(MMDFII))
  14442. +     (void) smtalk(SM_HELO, "ONEX");
  14443. + #endif /* not ZMAILER */
  14444. + #ifndef    MMDFII
  14445. +     if (watch)
  14446. +     (void) smtalk(SM_HELO, "VERB on");
  14447. + #endif
  14448.       if (client && *client)
  14449.       switch (smtalk (SM_HELO, "HELO %s", client)) {
  14450.           case 250: 
  14451. ***************
  14452. *** 279,284 ****
  14453. --- 351,360 ----
  14454.   }
  14455.   
  14456.   
  14457. + #ifdef    MPOP
  14458. + #define    MAXARGS    1000
  14459. + #endif /* MPOP */
  14460.   static int rclient (server, protocol, service)
  14461.   char   *server,
  14462.          *protocol,
  14463. ***************
  14464. *** 286,299 ****
  14465.   {
  14466.       int     sd;
  14467.       char    response[BUFSIZ];
  14468.   
  14469.       if ((sd = client (server, protocol, service, FALSE, response)) != NOTOK)
  14470.       return sd;
  14471.   
  14472.       (void) sm_ierror ("%s", response);
  14473.       return NOTOK;
  14474.   }
  14475. ! #endif    SMTP
  14476.   
  14477.   /*   */
  14478.   
  14479. --- 362,407 ----
  14480.   {
  14481.       int     sd;
  14482.       char    response[BUFSIZ];
  14483. + #ifdef    MPOP
  14484. +     char   *cp;
  14485. + #endif /* MPOP */
  14486.   
  14487.       if ((sd = client (server, protocol, service, FALSE, response)) != NOTOK)
  14488.       return sd;
  14489.   
  14490. + #ifdef    MPOP
  14491. +     if (!server && servers && (cp = index (servers, '/'))) {
  14492. +     register char  **ap;
  14493. +     char   *arguments[MAXARGS];
  14494. +     (void) copyip (brkstring (cp = getcpy (servers), " ", "\n"),
  14495. +                arguments);
  14496. +     for (ap = arguments; *ap; ap++)
  14497. +         if (**ap == '/') {
  14498. +         register char *dp;
  14499. +         if ((dp = rindex (*ap, '/')) && *++dp == NULL)
  14500. +             *--dp = NULL;
  14501. +         (void) sprintf (sm_tmpfil, "%s/smtpXXXXXX", *ap);
  14502. +         (void) mktemp (sm_tmpfil);
  14503. +         if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
  14504. +             sm_ispool = 1;
  14505. +             break;
  14506. +         }
  14507. +         }
  14508. +     free (cp);
  14509. +     if (sd != NOTOK)
  14510. +         return sd;
  14511. +     }
  14512. + #endif /* MPOP */
  14513.       (void) sm_ierror ("%s", response);
  14514.       return NOTOK;
  14515.   }
  14516. ! #endif    /* SMTP */
  14517.   
  14518.   /*   */
  14519.   
  14520. ***************
  14521. *** 301,306 ****
  14522. --- 409,423 ----
  14523.   register int    mode;
  14524.   register char   *from;
  14525.   {
  14526. + #ifdef    MPOP
  14527. +     if (sm_ispool && !sm_wfp) {
  14528. +     (void) strlen (strcpy (sm_reply.text,
  14529. +                    "unable to create new spool file"));
  14530. +     sm_reply.code = NOTOK;
  14531. +     return RP_BHST;
  14532. +     }
  14533. + #endif /* MPOP */
  14534.       switch (smtalk (SM_MAIL, "%s FROM:<%s>",
  14535.           mode == S_SEND ? "SEND" : mode == S_SOML ? "SOML"
  14536.           : mode == S_SAML ? "SAML" : "MAIL", from)) {
  14537. ***************
  14538. *** 322,334 ****
  14539.   
  14540.   #ifdef    BERK
  14541.   /* ARGUSED */
  14542. ! #endif    BERK
  14543.   
  14544.   int     sm_wadr (mbox, host, path)
  14545.   register char   *mbox;
  14546.   #ifndef    BERK
  14547.   register
  14548. ! #endif    not BERK
  14549.        char   *host,
  14550.           *path;
  14551.   {
  14552. --- 439,451 ----
  14553.   
  14554.   #ifdef    BERK
  14555.   /* ARGUSED */
  14556. ! #endif    /* BERK */
  14557.   
  14558.   int     sm_wadr (mbox, host, path)
  14559.   register char   *mbox;
  14560.   #ifndef    BERK
  14561.   register
  14562. ! #endif    /* not BERK */
  14563.        char   *host,
  14564.           *path;
  14565.   {
  14566. ***************
  14567. *** 336,344 ****
  14568.       switch (smtalk (SM_RCPT, host && *host ? "RCPT TO:<%s%s@%s>"
  14569.                          : "RCPT TO:<%s%s>",
  14570.                    path ? path : "", mbox, host)) {
  14571. ! #else    BERK
  14572.       switch (smtalk (SM_RCPT, "RCPT TO:%s", mbox)) {
  14573. ! #endif    BERK
  14574.       case 250: 
  14575.       case 251: 
  14576.           sm_addrs++;
  14577. --- 453,461 ----
  14578.       switch (smtalk (SM_RCPT, host && *host ? "RCPT TO:<%s%s@%s>"
  14579.                          : "RCPT TO:<%s%s>",
  14580.                    path ? path : "", mbox, host)) {
  14581. ! #else    /* BERK */
  14582.       switch (smtalk (SM_RCPT, "RCPT TO:%s", mbox)) {
  14583. ! #endif    /* BERK */
  14584.       case 250: 
  14585.       case 251: 
  14586.           sm_addrs++;
  14587. ***************
  14588. *** 348,354 ****
  14589.   #ifdef SENDMAILBUG
  14590.           sm_addrs++;
  14591.           return RP_OK;
  14592. ! #endif SENDMAILBUG
  14593.       case 421: 
  14594.       case 450: 
  14595.       case 452: 
  14596. --- 465,471 ----
  14597.   #ifdef SENDMAILBUG
  14598.           sm_addrs++;
  14599.           return RP_OK;
  14600. ! #endif /* SENDMAILBUG */
  14601.       case 421: 
  14602.       case 450: 
  14603.       case 452: 
  14604. ***************
  14605. *** 381,387 ****
  14606.   #ifdef SENDMAILBUG
  14607.           sm_nl = TRUE;
  14608.           return RP_OK;
  14609. ! #endif SENDMAILBUG
  14610.       case 421: 
  14611.           return RP_NO;
  14612.   
  14613. --- 498,504 ----
  14614.   #ifdef SENDMAILBUG
  14615.           sm_nl = TRUE;
  14616.           return RP_OK;
  14617. ! #endif /* SENDMAILBUG */
  14618.       case 421: 
  14619.           return RP_NO;
  14620.   
  14621. ***************
  14622. *** 426,432 ****
  14623.       case 451: 
  14624.   #ifdef SENDMAILBUG
  14625.           return RP_OK;
  14626. ! #endif SENDMAILBUG
  14627.       case 452: 
  14628.       default: 
  14629.           return RP_NO;
  14630. --- 543,549 ----
  14631.       case 451: 
  14632.   #ifdef SENDMAILBUG
  14633.           return RP_OK;
  14634. ! #endif /* SENDMAILBUG */
  14635.       case 452: 
  14636.       default: 
  14637.           return RP_NO;
  14638. ***************
  14639. *** 454,460 ****
  14640.       default: 
  14641.           break;
  14642.       }
  14643. ! #endif    not SMTP
  14644.       if (sm_rfp == NULL && sm_wfp == NULL)
  14645.       return RP_OK;
  14646.   
  14647. --- 571,577 ----
  14648.       default: 
  14649.           break;
  14650.       }
  14651. ! #endif    /* not SMTP */
  14652.       if (sm_rfp == NULL && sm_wfp == NULL)
  14653.       return RP_OK;
  14654.   
  14655. ***************
  14656. *** 474,482 ****
  14657.           (void) kill (sm_child, SIGKILL);
  14658.           discard (sm_rfp);
  14659.           discard (sm_wfp);
  14660. ! #else    SMTP
  14661.           (void) smtalk (SM_QUIT, "QUIT");
  14662. ! #endif    not SMTP
  14663.           if (type == NOTOK) {
  14664.           sm_reply.code = sm_note.code;
  14665.           (void) strncpy (sm_reply.text, sm_note.text,
  14666. --- 591,599 ----
  14667.           (void) kill (sm_child, SIGKILL);
  14668.           discard (sm_rfp);
  14669.           discard (sm_wfp);
  14670. ! #else    /* SMTP */
  14671.           (void) smtalk (SM_QUIT, "QUIT");
  14672. ! #endif    /* not SMTP */
  14673.           if (type == NOTOK) {
  14674.           sm_reply.code = sm_note.code;
  14675.           (void) strncpy (sm_reply.text, sm_note.text,
  14676. ***************
  14677. *** 484,489 ****
  14678. --- 601,619 ----
  14679.           }
  14680.           break;
  14681.       }
  14682. + #ifdef    MPOP
  14683. + #ifdef    SMTP
  14684. +     if (sm_ispool) {
  14685. +     sm_ispool = 0;
  14686. +     if (sm_wfp) {
  14687. +         (void) unlink (sm_tmpfil);
  14688. +         (void) fclose (sm_wfp);
  14689. +         sm_wfp = NULL;
  14690. +     }
  14691. +     }
  14692. + #endif
  14693. + #endif /* MPOP */
  14694.       if (sm_rfp != NULL) {
  14695.       (void) alarm (SM_CLOS);
  14696.       (void) fclose (sm_rfp);
  14697. ***************
  14698. *** 499,507 ****
  14699.       status = pidwait (sm_child);
  14700.   
  14701.       sm_child = NOTOK;
  14702. ! #else    SMTP
  14703.       status = 0;
  14704. ! #endif    SMTP
  14705.       sm_rfp = sm_wfp = NULL;
  14706.   
  14707.       return (status ? RP_BHST : RP_OK);
  14708. --- 629,637 ----
  14709.       status = pidwait (sm_child);
  14710.   
  14711.       sm_child = NOTOK;
  14712. ! #else    /* SMTP */
  14713.       status = 0;
  14714. ! #endif    /* SMTP */
  14715.       sm_rfp = sm_wfp = NULL;
  14716.   
  14717.       return (status ? RP_BHST : RP_OK);
  14718. ***************
  14719. *** 509,514 ****
  14720. --- 639,994 ----
  14721.   
  14722.   /*   */
  14723.   
  14724. + #ifdef    MPOP
  14725. + #ifdef    SMTP
  14726. + #include <sys/types.h>
  14727. + #include <sys/stat.h>
  14728. + int    sm_bulk (file)
  14729. + char   *file;
  14730. + {
  14731. +     int        cc,
  14732. +         i,
  14733. +         j,
  14734. +         k,
  14735. +         result;
  14736. +     long    pos;
  14737. +     register char *dp;
  14738. +     char   *bp,
  14739. +        *cp,
  14740. +         buffer[BUFSIZ],
  14741. +         sender[BUFSIZ];
  14742. +     FILE   *fp,
  14743. +        *gp;
  14744. +     gp = NULL;
  14745. +     k = strlen (file) - sizeof ".bulk";
  14746. +     if ((fp = fopen (file, "r")) == NULL) {
  14747. +     (void) sprintf (bp = sm_reply.text, "unable to read %s: ", file);
  14748. +     bp += strlen (bp);
  14749. +     if (errno > 0 && errno < sys_nerr)
  14750. +         (void) sprintf (bp, "%s", sys_errlist[errno]);
  14751. +     else
  14752. +         (void) sprintf (bp, "Error %d", errno);
  14753. +     sm_reply.length = strlen (sm_reply.text);
  14754. +     sm_reply.code = NOTOK;
  14755. +     return RP_BHST;
  14756. +     }
  14757. +     if (sm_debug) {
  14758. +     printf ("reading file %s\n", file);
  14759. +     (void) fflush (stdout);
  14760. +     }
  14761. +     i = j = 0;
  14762. +     while (fgets (buffer, sizeof buffer, fp)) {
  14763. +     if (j++ == 0)
  14764. +         (void) strcpy (sender, buffer + sizeof "MAIL FROM:" - 1);
  14765. +     if (strcmp (buffer, "DATA\r\n") == 0) {
  14766. +         i = 1;
  14767. +         break;
  14768. +     }
  14769. +     }
  14770. +     if (i == 0) {
  14771. +     if (sm_debug) {
  14772. +         printf ("no DATA...\n");
  14773. +         (void) fflush (stdout);
  14774. +     }
  14775. + losing0: ;
  14776. +     (void) sprintf (buffer, "%s.bad", file);
  14777. +     (void) rename (file, buffer);
  14778. +     if (gp) {
  14779. +         (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
  14780. +         (void) unlink (buffer);
  14781. +         (void) fclose (gp);
  14782. +     }
  14783. +     (void) fclose (fp);
  14784. +     return RP_OK;
  14785. +     }
  14786. +     if (j < 3) {
  14787. +     if (sm_debug) {
  14788. +         printf ("no %srecipients...\n", j < 1 ? "sender or " : "");
  14789. +         (void) fflush (stdout);
  14790. +     }
  14791. +     goto losing0;
  14792. +     }
  14793. +     if ((cp = malloc ((unsigned) (cc = (pos = ftell (fp)) + 1))) == NULL) {
  14794. +     sm_reply.length = strlen (strcpy (sm_reply.text, "out of memory"));
  14795. + losing1: ;
  14796. +     sm_reply.code = NOTOK;
  14797. +     (void) fclose (fp);
  14798. +     return RP_BHST;
  14799. +     }
  14800. +     (void) fseek (fp, 0L, 0);
  14801. +     for (dp = cp, i = 0; i++ < j; dp += strlen (dp))
  14802. +     if (fgets (dp, cc - (dp - cp), fp) == NULL) {
  14803. +         sm_reply.length = strlen (strcpy (sm_reply.text, "premature eof"));
  14804. + losing2: ;
  14805. +         free (cp);
  14806. +         goto losing1;
  14807. +     }
  14808. +     *dp = NULL;
  14809. +     for (dp = cp, i = cc - 1; i > 0; dp += cc, i -= cc)
  14810. +     if ((cc = write (fileno (sm_wfp), dp, i)) == NOTOK) {
  14811. + losing3: ;
  14812. +         (void) strcpy (bp = sm_reply.text, "error writing to server: ");
  14813. +         bp += strlen (bp);
  14814. +         if (errno > 0 && errno < sys_nerr)
  14815. +         (void) sprintf (bp, "%s", sys_errlist[errno]);
  14816. +         else
  14817. +         (void) sprintf (bp, "Error %d", errno);
  14818. +         sm_reply.length = strlen (sm_reply.text);
  14819. +         goto losing2;
  14820. +     }
  14821. +     else
  14822. +         if (sm_debug) {
  14823. +         printf ("wrote %d octets to server\n", cc);
  14824. +         (void) fflush (stdout);
  14825. +         }
  14826. +     for (dp = cp, i = 0; i++ < j; dp = index (dp, '\n'), dp++) {
  14827. +     if (sm_debug) {
  14828. +         if (bp = index (dp, '\r'))
  14829. +         *bp = NULL;
  14830. +         printf ("=> %s\n", dp);
  14831. +         (void) fflush (stdout);
  14832. +         if (bp)
  14833. +         *bp = '\r';
  14834. +     }
  14835. +     switch (smhear () + (i == 1 ? 1000 : i != j ? 2000 : 3000)) {
  14836. +         case 1000 + 250:
  14837. +             sm_addrs = 0;
  14838. +             result = RP_OK;
  14839. +         break;
  14840. +         case 1000 + 500: 
  14841. +         case 1000 + 501: 
  14842. +         case 1000 + 552: 
  14843. +         case 2000 + 500: 
  14844. +         case 2000 + 501:
  14845. +         result = RP_PARM;
  14846. +         (void) smtalk (SM_RSET, "RSET");
  14847. +         free (cp);
  14848. +         goto losing0;
  14849. +         case 2000 + 250:
  14850. +         case 2000 + 251:
  14851. +         sm_addrs++;
  14852. +             result = RP_OK;
  14853. +         break;
  14854. +         case 2000 + 451: 
  14855. + #ifdef SENDMAILBUG
  14856. +         sm_addrs++;
  14857. +         result = RP_OK;
  14858. +         break;
  14859. + #endif
  14860. +         case 2000 + 421: 
  14861. +         case 2000 + 450: 
  14862. +         case 2000 + 452: 
  14863. +         result = RP_NO;
  14864. +         goto bad_addr;
  14865. +         case 2000 + 550: 
  14866. +         case 2000 + 551: 
  14867. +         case 2000 + 552: 
  14868. +         case 2000 + 553: 
  14869. +         result = RP_USER;
  14870. + bad_addr: ;
  14871. +         if (k <= 0 || strcmp (sender, "<>\r\n") == 0)
  14872. +             break;
  14873. +         if (gp == NULL) {
  14874. +             int        l;
  14875. +             (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
  14876. +             if ((gp = fopen (buffer, "w+")) == NULL)
  14877. +             goto bad_data;
  14878. +             fprintf (gp, "MAIL FROM:<>\r\nRCPT TO:%sDATA\r\n", sender);
  14879. +             l = strlen (sender);
  14880. +             fprintf (gp,
  14881. +                  "To: %*.*s\r\nSubject: Invalid addresses (%s)\r\n",
  14882. +                  l - 4, l - 4, sender + 1, file);
  14883. +             fprintf (gp, "Date: %s\r\nFrom: Postmaster@%s\r\n\r\n",
  14884. +                  dtimenow (), LocalName ());
  14885. +         }
  14886. +         if (bp = index (dp, '\r'))
  14887. +             *bp = NULL;
  14888. +         fprintf (gp, "=>        %s\r\n", dp);
  14889. +         if (bp)
  14890. +             *bp = '\r';
  14891. +         fprintf (gp, "<= %s\r\n", rp_string (result));
  14892. +         (void) fflush (gp);
  14893. +         break;
  14894. +         case 3000 + 354: 
  14895. + #ifdef SENDMAILBUG
  14896. + ok_data: ;
  14897. + #endif
  14898. +         result = RP_OK;
  14899. +         break;
  14900. +         case 3000 + 451: 
  14901. + #ifdef SENDMAILBUG
  14902. +         goto ok_data;
  14903. + #endif
  14904. +         case 3000 + 421:
  14905. +         result = RP_NO;
  14906. + bad_data: ;
  14907. +         (void) smtalk (SM_RSET, "RSET");
  14908. +         free (cp);
  14909. +         if (gp) {
  14910. +             (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
  14911. +             (void) unlink (buffer);
  14912. +             (void) fclose (gp);
  14913. +         }
  14914. +         (void) fclose (fp);
  14915. +         return result;
  14916. +         case 3000 + 500: 
  14917. +         case 3000 + 501: 
  14918. +         case 3000 + 503: 
  14919. +         case 3000 + 554: 
  14920. +         (void) smtalk (SM_RSET, "RSET");
  14921. +         free (cp);
  14922. +         goto no_dice;
  14923. +         default:
  14924. +         result = RP_RPLY;
  14925. +         goto bad_data;
  14926. +     }
  14927. +     }
  14928. +     free (cp);
  14929. +     {
  14930. +     struct stat st;
  14931. + #ifdef SYS5
  14932. +     cc = BUFSIZ;
  14933. + #else
  14934. +     if (fstat (fileno (sm_wfp), &st) == NOTOK
  14935. +             || (cc = st.st_blksize) < BUFSIZ)
  14936. +         cc = BUFSIZ;
  14937. + #endif
  14938. +     if ((cp = malloc ((unsigned) cc)) == NULL) {
  14939. +         (void) smtalk (SM_RSET, "RSET");
  14940. +         sm_reply.length = strlen (strcpy (sm_reply.text, "out of memory"));
  14941. +         goto losing1;
  14942. +     }
  14943. +     }
  14944. +     (void) fseek (fp, pos, 0);
  14945. +     for (;;) {
  14946. +     int    eof = 0;
  14947. +     for (dp = cp, i = cc; i > 0; dp += j, i -= j)
  14948. +         if ((j = fread (cp, sizeof *cp, i, fp)) == OK) {
  14949. +         if (ferror (fp)) {
  14950. +             (void) sprintf (bp = sm_reply.text,
  14951. +                     "error reading %s: ", file);
  14952. +             bp += strlen (bp);
  14953. +             if (errno > 0 && errno < sys_nerr)
  14954. +             (void) sprintf (bp, "%s", sys_errlist[errno]);
  14955. +             else
  14956. +             (void) sprintf (bp, "Error %d", errno);
  14957. +             sm_reply.length = strlen (sm_reply.text);
  14958. +             goto losing2;
  14959. +         }
  14960. +         cc = dp - cp;
  14961. +         eof = 1;
  14962. +         break;
  14963. +         }
  14964. +     for (dp = cp, i = cc; i > 0; dp += j, i -= j)
  14965. +         if ((j = write (fileno (sm_wfp), dp, i)) == NOTOK)
  14966. +         goto losing3;
  14967. +         else
  14968. +         if (sm_debug) {
  14969. +             printf ("wrote %d octets to server\n", j);
  14970. +             (void) fflush (stdout);
  14971. +         }
  14972. +     if (eof)
  14973. +         break;
  14974. +     }
  14975. +     free (cp);
  14976. +     switch (smhear ()) {
  14977. +     case 250: 
  14978. +     case 251: 
  14979. + #ifdef SENDMAILBUG
  14980. + ok_dot: ;
  14981. + #endif
  14982. +         result = RP_OK;
  14983. +         (void) unlink (file);
  14984. +         break;
  14985. +     case 451: 
  14986. + #ifdef SENDMAILBUG
  14987. +         goto ok_dot;
  14988. + #endif
  14989. +     case 452: 
  14990. +     default: 
  14991. +         result = RP_NO;
  14992. +         if (gp) {
  14993. +         (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
  14994. +         (void) unlink (buffer);
  14995. +         (void) fclose (gp);
  14996. +         gp = NULL;
  14997. +         }
  14998. +         break;
  14999. +     case 552: 
  15000. +     case 554: 
  15001. + no_dice: ;
  15002. +         result = RP_NDEL;
  15003. +         if (k <= 0 || strcmp (sender, "<>\r\n") == 0) {
  15004. +         (void) unlink (file);
  15005. +         break;
  15006. +         }
  15007. +         if (gp) {
  15008. +         (void) fflush (gp);
  15009. +         (void) ftruncate (fileno (gp), 0L);
  15010. +         (void) fseek (gp, 0L, 0);
  15011. +         }
  15012. +             else {
  15013. +         (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
  15014. +         if ((gp = fopen (buffer, "w")) == NULL)
  15015. +             break;
  15016. +         }
  15017. +         fprintf (gp, "MAIL FROM:<>\r\nRCPT TO:%sDATA\r\n", sender);
  15018. +         i = strlen (sender);
  15019. +         fprintf (gp, "To: %*.*s\r\nSubject: Failed mail (%s)\r\n",
  15020. +              i - 4, i - 4, sender + 1, file);
  15021. +             fprintf (gp, "Date: %s\r\nFrom: Postmaster@%s\r\n\r\n",
  15022. +              dtimenow (), LocalName ());
  15023. +         break;
  15024. +     }
  15025. +     if (gp) {
  15026. +     (void) fputs ("\r\n------- Begin Returned message\r\n\r\n", gp);
  15027. +     (void) fseek (fp, pos, 0);
  15028. +     while (fgets (buffer, sizeof buffer, fp)) {
  15029. +         if (buffer[0] == '-')
  15030. +         (void) fputs ("- ", gp);
  15031. +         if (strcmp (buffer, ".\r\n"))
  15032. +         (void) fputs (buffer, gp);
  15033. +     }
  15034. +     (void) fputs ("\r\n------- End Returned Message\r\n\r\n.\r\n", gp);
  15035. +     (void) fflush (gp);
  15036. +     if (!ferror (gp))
  15037. +         (void) unlink (file);
  15038. +     (void) fclose (gp);
  15039. +     }
  15040. +     (void) fclose (fp);
  15041. +     return result;
  15042. + }
  15043. + #endif
  15044. + #endif /* MPOP */
  15045. + /*   */
  15046.   /* VARARGS */
  15047.   
  15048.   static int  sm_ierror (fmt, a, b, c, d)
  15049. ***************
  15050. *** 542,547 ****
  15051. --- 1022,1097 ----
  15052.       (void) fflush (stdout);
  15053.       }
  15054.   
  15055. + #ifdef    MPOP
  15056. +     if (sm_ispool) {
  15057. +     char    file[BUFSIZ];
  15058. +     if (strcmp (buffer, ".") == 0)
  15059. +         time = SM_DOT;
  15060. +     fprintf (sm_wfp, "%s\r\n", buffer);
  15061. +     switch (time) {
  15062. +         case SM_DOT:
  15063. +             (void) fflush (sm_wfp);
  15064. +             if (ferror (sm_wfp))
  15065. +             return sm_werror ();
  15066. +         (void) sprintf (file, "%s%c.bulk", sm_tmpfil,
  15067. +                 (char) (sm_ispool + 'a' - 1));
  15068. +         if (rename (sm_tmpfil, file) == NOTOK) {
  15069. +             char   *bp;
  15070. +             (void) sprintf (bp = sm_reply.text,
  15071. +                     "error renaming %s to %s: ",
  15072. +                     sm_tmpfil, file);
  15073. +             bp += strlen (bp);
  15074. +             if (errno > 0 && errno < sys_nerr)
  15075. +             (void) sprintf (bp, "%s", sys_errlist[errno]);
  15076. +             else
  15077. +             (void) sprintf (bp, "Error %d", errno);
  15078. +             sm_reply.length = strlen (sm_reply.text);
  15079. +             sm_reply.code = NOTOK;
  15080. +             return RP_BHST;
  15081. +         }
  15082. +         (void) fclose (sm_wfp);
  15083. +         if (sm_wfp = fopen (sm_tmpfil, "w"))
  15084. +             (void) chmod (sm_tmpfil, 0600);
  15085. +         sm_ispool++;
  15086. +         /* and fall... */
  15087. +         case SM_MAIL:
  15088. +         case SM_RCPT:
  15089. +             result = 250;
  15090. +         break;
  15091. +         case SM_RSET:
  15092. +         (void) fflush (sm_wfp);
  15093. +         (void) ftruncate (fileno (sm_wfp), 0L);
  15094. +         (void) fseek (sm_wfp, 0L, 0);
  15095. +             result = 250;
  15096. +         break;
  15097. +         case SM_DATA:
  15098. +             result = 354;
  15099. +         break;
  15100. +         case SM_QUIT:
  15101. +         (void) unlink (sm_tmpfil);
  15102. +         sm_ispool = 0;
  15103. +             result = 221;
  15104. +         break;
  15105. +         default:
  15106. +         result = 500;
  15107. +         break;
  15108. +     }
  15109. +     if (sm_debug) {
  15110. +         printf ("<= %d\n", result);
  15111. +         (void) fflush (stdout);
  15112. +     }
  15113. +     sm_reply.text[sm_reply.length = 0] = NULL;
  15114. +     return (sm_reply.code = result);
  15115. +     }
  15116. + #endif /* MPOP */
  15117.       sm_alarmed = 0;
  15118.       (void) alarm ((unsigned) time);
  15119.       if ((result = sm_wrecord (buffer, strlen (buffer))) != NOTOK)
  15120. ***************
  15121. *** 561,567 ****
  15122.       return sm_werror ();
  15123.   
  15124.       (void) fwrite (buffer, sizeof *buffer, len, sm_wfp);
  15125. !     fputs ("\r\n", sm_wfp);
  15126.       (void) fflush (sm_wfp);
  15127.   
  15128.       return (ferror (sm_wfp) ? sm_werror () : OK);
  15129. --- 1111,1117 ----
  15130.       return sm_werror ();
  15131.   
  15132.       (void) fwrite (buffer, sizeof *buffer, len, sm_wfp);
  15133. !     (void) fputs ("\r\n", sm_wfp);
  15134.       (void) fflush (sm_wfp);
  15135.   
  15136.       return (ferror (sm_wfp) ? sm_werror () : OK);
  15137. ***************
  15138. *** 574,580 ****
  15139.   register int     len;
  15140.   {
  15141.       register char  *bp;
  15142. !     static char lc = NULL;
  15143.   
  15144.       if (sm_wfp == NULL)
  15145.       return sm_werror ();
  15146. --- 1124,1130 ----
  15147.   register int     len;
  15148.   {
  15149.       register char  *bp;
  15150. !     static char lc = 0;
  15151.   
  15152.       if (sm_wfp == NULL)
  15153.       return sm_werror ();
  15154. ***************
  15155. *** 581,588 ****
  15156.   
  15157.       if (buffer == NULL && len == 0) {
  15158.       if (lc != '\n')
  15159. !         fputs ("\r\n", sm_wfp);
  15160. !     lc = NULL;
  15161.       return (ferror (sm_wfp) ? sm_werror () : OK);
  15162.       }
  15163.   
  15164. --- 1131,1138 ----
  15165.   
  15166.       if (buffer == NULL && len == 0) {
  15167.       if (lc != '\n')
  15168. !         (void) fputs ("\r\n", sm_wfp);
  15169. !     lc = 0;
  15170.       return (ferror (sm_wfp) ? sm_werror () : OK);
  15171.       }
  15172.   
  15173. ***************
  15174. *** 611,627 ****
  15175.   
  15176.   /*   */
  15177.   
  15178.   static int  sm_werror () {
  15179.       sm_reply.length =
  15180.   #ifdef    SMTP
  15181.       strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no socket opened"
  15182.           : sm_alarmed ? "write to socket timed out"
  15183.           : "error writing to socket"));
  15184. ! #else    not SMTP
  15185.       strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no pipe opened"
  15186.           : sm_alarmed ? "write to pipe timed out"
  15187.           : "error writing to pipe"));
  15188. ! #endif    not SMTP
  15189.   
  15190.       return (sm_reply.code = NOTOK);
  15191.   }
  15192. --- 1161,1191 ----
  15193.   
  15194.   /*   */
  15195.   
  15196. + #ifdef _AIX
  15197. + /*
  15198. +  * AIX by default will inline the strlen and strcpy commands by redefining
  15199. +  * them as __strlen and __strcpy respectively.  This causes compile problems
  15200. +  * with the #ifdef MPOP in the middle.  Should the #ifdef MPOP be removed,
  15201. +  * remove these #undefs.
  15202. +  */
  15203. + #undef strlen
  15204. + #undef strcpy
  15205. + #endif /* _AIX */
  15206.   static int  sm_werror () {
  15207.       sm_reply.length =
  15208.   #ifdef    SMTP
  15209.       strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no socket opened"
  15210.           : sm_alarmed ? "write to socket timed out"
  15211. + #ifdef    MPOP
  15212. +         : sm_ispool ? "error writing to spool file"
  15213. + #endif
  15214.           : "error writing to socket"));
  15215. ! #else    /* !SMTP */
  15216.       strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no pipe opened"
  15217.           : sm_alarmed ? "write to pipe timed out"
  15218.           : "error writing to pipe"));
  15219. ! #endif    /* !SMTP */
  15220.   
  15221.       return (sm_reply.code = NOTOK);
  15222.   }
  15223. ***************
  15224. *** 641,647 ****
  15225.   
  15226.   again: ;
  15227.   
  15228. !     sm_reply.text[sm_reply.length = 0] = NULL;
  15229.   
  15230.       rp = sm_reply.text, rc = sizeof sm_reply.text - 1;
  15231.       for (more = FALSE; sm_rrecord (bp = buffer, &bc) != NOTOK;) {
  15232. --- 1205,1211 ----
  15233.   
  15234.   again: ;
  15235.   
  15236. !     sm_reply.text[sm_reply.length = 0] = 0;
  15237.   
  15238.       rp = sm_reply.text, rc = sizeof sm_reply.text - 1;
  15239.       for (more = FALSE; sm_rrecord (bp = buffer, &bc) != NOTOK;) {
  15240. ***************
  15241. *** 712,718 ****
  15242.       if (sm_rfp == NULL)
  15243.       return sm_rerror ();
  15244.   
  15245. !     buffer[*len = 0] = NULL;
  15246.   
  15247.       (void) fgets (buffer, BUFSIZ, sm_rfp);
  15248.       *len = strlen (buffer);
  15249. --- 1276,1282 ----
  15250.       if (sm_rfp == NULL)
  15251.       return sm_rerror ();
  15252.   
  15253. !     buffer[*len = 0] = 0;
  15254.   
  15255.       (void) fgets (buffer, BUFSIZ, sm_rfp);
  15256.       *len = strlen (buffer);
  15257. ***************
  15258. *** 724,730 ****
  15259.       else
  15260.       if (buffer[*len - 2] == '\r')
  15261.           *len -= 1;
  15262. !     buffer[*len - 1] = NULL;
  15263.   
  15264.       return OK;
  15265.   }
  15266. --- 1288,1294 ----
  15267.       else
  15268.       if (buffer[*len - 2] == '\r')
  15269.           *len -= 1;
  15270. !     buffer[*len - 1] = 0;
  15271.   
  15272.       return OK;
  15273.   }
  15274. ***************
  15275. *** 738,749 ****
  15276.           : sm_alarmed ? "read from socket timed out"
  15277.           : feof (sm_rfp) ? "premature end-of-file on socket"
  15278.           : "error reading from socket"));
  15279. ! #else    not SMTP
  15280.       strlen (strcpy (sm_reply.text, sm_rfp == NULL ? "no pipe opened"
  15281.           : sm_alarmed ? "read from pipe timed out"
  15282.           : feof (sm_rfp) ? "premature end-of-file on pipe"
  15283.           : "error reading from pipe"));
  15284. ! #endif    not SMTP
  15285.   
  15286.       return (sm_reply.code = NOTOK);
  15287.   }
  15288. --- 1302,1313 ----
  15289.           : sm_alarmed ? "read from socket timed out"
  15290.           : feof (sm_rfp) ? "premature end-of-file on socket"
  15291.           : "error reading from socket"));
  15292. ! #else    /* not SMTP */
  15293.       strlen (strcpy (sm_reply.text, sm_rfp == NULL ? "no pipe opened"
  15294.           : sm_alarmed ? "read from pipe timed out"
  15295.           : feof (sm_rfp) ? "premature end-of-file on pipe"
  15296.           : "error reading from pipe"));
  15297. ! #endif    /* not SMTP */
  15298.   
  15299.       return (sm_reply.code = NOTOK);
  15300.   }
  15301. ***************
  15302. *** 752,763 ****
  15303.   
  15304.   /* ARGSUSED */
  15305.   
  15306. ! static    int alrmser (i)
  15307.   int     i;
  15308.   {
  15309.   #ifndef    BSD42
  15310.       signal (SIGALRM, alrmser);
  15311. ! #endif    BSD42
  15312.       sm_alarmed++;
  15313.   
  15314.       if (sm_debug) {
  15315. --- 1316,1327 ----
  15316.   
  15317.   /* ARGSUSED */
  15318.   
  15319. ! static    TYPESIG alrmser (i)
  15320.   int     i;
  15321.   {
  15322.   #ifndef    BSD42
  15323.       signal (SIGALRM, alrmser);
  15324. ! #endif    /* BSD42 */
  15325.       sm_alarmed++;
  15326.   
  15327.       if (sm_debug) {
  15328. ***************
  15329. *** 817,819 ****
  15330. --- 1381,1447 ----
  15331.       (void) sprintf (buffer, "[%s] %3d %s", text, sm_reply.code, sm_reply.text);
  15332.       return buffer;
  15333.   }
  15334. + /*   */
  15335. + #ifdef    MPOP
  15336. + #ifdef    SMTP
  15337. + static char *broken[MAXARGS + 1];
  15338. + static char **brkstring (strg, brksep, brkterm)
  15339. + register char  *strg;
  15340. + register char  *brksep,
  15341. +                *brkterm;
  15342. + {
  15343. +     register int    bi;
  15344. +     register char   c,
  15345. +                    *sp;
  15346. +     sp = strg;
  15347. +     for (bi = 0; bi < MAXARGS; bi++) {
  15348. +     while (brkany (c = *sp, brksep))
  15349. +         *sp++ = 0;
  15350. +     if (!c || brkany (c, brkterm)) {
  15351. +         *sp = 0;
  15352. +         broken[bi] = 0;
  15353. +         return broken;
  15354. +     }
  15355. +     broken[bi] = sp;
  15356. +     while ((c = *++sp) && !brkany (c, brksep) && !brkany (c, brkterm))
  15357. +         continue;
  15358. +     }
  15359. +     broken[MAXARGS] = 0;
  15360. +     return broken;
  15361. + }
  15362. + static  brkany (chr, strg)
  15363. + register char   chr,
  15364. +                *strg;
  15365. + {
  15366. +     register char  *sp;
  15367. +     if (strg)
  15368. +     for (sp = strg; *sp; sp++)
  15369. +         if (chr == *sp)
  15370. +         return 1;
  15371. +     return 0;
  15372. + }
  15373. + static char **copyip (p, q)
  15374. + register char **p,
  15375. +               **q;
  15376. + {
  15377. +     while (*p)
  15378. +     *q++ = *p++;
  15379. +     *q = 0;
  15380. +     return q;
  15381. + }
  15382. + #endif
  15383. + #endif /* MPOP */
  15384. *** ../mh-6.7.2/papers/bboards/Makefile    Tue Mar  6 14:49:43 1990
  15385. --- papers/bboards/Makefile    Thu Feb 13 10:23:48 1992
  15386. ***************
  15387. *** 10,12 ****
  15388.   
  15389. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  15390.               \\nonstopmode\\input $<\\bye; \
  15391. --- 10,12 ----
  15392.   
  15393. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  15394.               \\nonstopmode\\input $<\\bye; \
  15395. *** ../mh-6.7.2/papers/beginners/beginners.tex    Tue May 17 15:38:24 1988
  15396. --- papers/beginners/beginners.tex    Thu Feb 13 10:34:58 1992
  15397. ***************
  15398. *** 4,5 ****
  15399. --- 4,7 ----
  15400.   
  15401. + %$Id: beginners.tex,v 1.2 1992/02/13 18:34:49 jromine Exp $
  15402.   \def\oneline#1{\par\bigskip\leftline{\tt\hskip.75in#1}}
  15403. ***************
  15404. *** 22,23 ****
  15405. --- 24,28 ----
  15406.   for Xeroxing in suite CS408.
  15407. + \footnote{This document is specific to the environment
  15408. + at the ICS department of U.~C.~Irvine.  For a more general document,
  15409. + see {\sl The Rand MH Message Handling System: Tutorial\/}.}
  15410.   
  15411. *** /dev/null    Tue Dec 15 08:01:10 1992
  15412. --- papers/changes/MHCHANGES    Thu Oct 29 14:54:48 1987
  15413. ***************
  15414. *** 0 ****
  15415. --- 1,1539 ----
  15416. +                MHCHANGES from MH 6.1 to MH 6.5
  15417. + Tue Nov 12 11:24:46 1985  /mtr <mrose@nrtc-gremlin>
  15418. +     MH 6.1 is official.
  15419. + Fri Nov 15 19:14:44 1985  /mtr <mrose@nrtc-gremlin>
  15420. +     uip/{rcvtty,slocal}.c: touch-ups
  15421. + Sun Nov 17 16:28:23 1985  /mtr <mrose@nrtc-gremlin>
  15422. +     conf/doc/{ap,mhl,repl,scan}.rf: note that #ifdef BERK kills
  15423. +         address parsing
  15424. +     conf/makefiles/{doc,uip,support/*,zotnet/*}: make tar command visible
  15425. +     sbr/m_convert.c: oops, new message numbering resulted in bad
  15426. +         diagnostic
  15427. +     papers/*/Makefile: fix LaTeX rule for v2.08
  15428. + Tue Nov 19 23:06:16 1985  /mtr <mrose@nrtc-gremlin>
  15429. +     uip/send.c: de-referencing NULL due to bad precedence, tsk
  15430. + Wed Nov 20 10:58:40 1985  /mtr <mrose@nrtc-gremlin>
  15431. +     MH 6.1 covert update for sbr/m_convert.c, uip/send.c
  15432. + Sun Nov 24 18:58:41 1985  /mtr <mrose@nrtc-gremlin>
  15433. +     uip/slocal.c: some tuning, also fix a bug in usr_pipe()
  15434. +     uip/dropsbr.c: have mbx_copy support noisy
  15435. +     uip/{packf,post,rcvpack,sbboards,slocal}.c: use this change
  15436. + Tue Nov 26 00:22:17 1985  /mtr <mrose@nrtc-gremlin>
  15437. +     uip/refile.c: oops, forgot copy-back on optimzied m_remsg
  15438. + Sat Nov 30 22:36:49 1985  /mtr <mrose@nrtc-gremlin>
  15439. +     zotnet/tws/dtime.c: add #ifdef INETONLY
  15440. +     uip/post.c: for #ifdef BERK don't say {Local,UUCP,Network}
  15441. +         Recipients
  15442. +     conf/doc/sortm.rf: note problem with errors
  15443. +     uip/bbc.c: for getbbvis() insist on readability
  15444. +     support/bboards/bbexp.c: oops, calling pick wrong
  15445. +     conf/doc/pick.rf: document -datefield anomaly
  15446. +     conf/makefiles/support/bboards: oops, left context owned by root
  15447. +     h/mh.h: ruserpass -> _ruserpass for SUN.  why?
  15448. + Sun Dec  1 07:58:50 1985  /mtr <mrose@nrtc-gremlin>
  15449. +     uip/vmh.c: remove double-scroll
  15450. +     uip/annosbr.c: oops, closing fd: without unlocking!
  15451. +     sbr/makedir.c: plug an obscure security hole in inc
  15452. +     uip/mhlsbr.c: read_termcap being called prematurely
  15453. +     zotnet/tws/dtime.c: load tw_sday appropriately
  15454. +     zotnet/tws/*.c: try using numeric timezone for official renditions,
  15455. +         under #ifdef MTR for now
  15456. + Sun Dec  1 16:11:03 1985  /mtr <mrose@nrtc-gremlin>
  15457. +     uip/inc.c: more idiotic de-referncing of NULL, found on SUNs
  15458. +     uip/replsbr.c: ditto
  15459. +     uip/show.c: recognize more of mhl's switches
  15460. + Wed Dec  4 23:38:06 1985  /mtr <mrose@nrtc-gremlin>
  15461. +     zotnet/mts/mts.h: oops for MMDFONLY
  15462. +     conf/{mh-gen.8,makefiles/zotnet/mts}: talk about -Dlocname
  15463. + Thu Dec  5 19:55:11 1985  /mtr <mrose@nrtc-gremlin>
  15464. +     uip/scansbr.c: fix machine dependency pointed out by Chuck Collins
  15465. +     dist/READ-ME: new file talking about make bug
  15466. +     COVER-LETTER, conf/{mh-gen.8,doc/MH.rf}: change UCI -> UCI.EDU
  15467. + Fri Dec  6 11:08:20 1985  /mtr <mrose@nrtc-gremlin>
  15468. +     support/bboards/mmdfII/gen: wrong filename
  15469. + Sun Dec  8 18:39:01 1985  /mtr <mrose@nrtc-gremlin>
  15470. +     uip/send.c: always remove dist file
  15471. +     uip/vmh.c: work on erase-word handling, a bit
  15472. +     uip/folder.c: -fast -vs- -pack fixup
  15473. +     uip/mhlsbr.c: %text defined for date fields
  15474. + Tue Dec 10 18:39:37 1985  /mtr <mrose@nrtc-gremlin>
  15475. +     zotnet/mts/client.c: moved from mts/sendmail/client.c
  15476. +     conf/makefiles/{mts/sendmail,zotnet/mts}: changed
  15477. +     mts/support/llib-lsendmail, zotnet/mts/llib-lmts: changed
  15478. +     mts/sendmail/client.c: 4.2BSD specific only!
  15479. +     conf/config/mts.c, zotnet/mts/mts.h: update
  15480. +     conf/mhconfig.c: update
  15481. +     conf/Makefile: simplify
  15482. + Tue Dec 10 21:11:45 1985  /mtr <mrose@nrtc-gremlin>
  15483. +     conf/mh-gen.8: clear up some sys5 stuff
  15484. +     zotnet/mf/umhook.c: sys5-ize
  15485. +     uip/addrsbr.c: alternate-mailboxes: defaulted wrong under #ifdef
  15486. +         BERK, it's now "<userid>*"
  15487. +     conf/doc/mh-profile.rf: fix documentation to reflect reality
  15488. + Tue Dec 10 22:38:23 1985  /mtr <mrose@nrtc-gremlin>
  15489. +     uip/addrsbr.c: normalize a bit (finally)
  15490. +     uip/addrsbr.c: new routine adrsprintf() to remove #ifdef BANG
  15491. +         dependencies
  15492. +     uip/{post,rcvdist,replsbr,sbboards}.c: use adrsprintf()
  15493. +     uip/post.c: remove #ifdef MF dependency for stand-alone MH,
  15494. +         remove #ifdef DUMB dependency by making addrsbr.c smarter
  15495. +         about being dumber
  15496. +     mts/mmdf/hosts.c: remove #ifdef DUMB dependency (right now,
  15497. +         addrsbr:getm() is the only one that calls it and it doesn't
  15498. +         call it under #ifdef DUMB...
  15499. + Tue Dec 10 23:28:20 1985  /mtr <mrose@nrtc-gremlin>
  15500. +     uip/sbboards.c: oops, typo found by lint
  15501. + Wed Dec 11 19:08:20 1985  /mtr <mrose@nrtc-gremlin>
  15502. +     miscellany/libndir: -lndir for non-BSD sites, graciously supplied
  15503. +         by Kirk McKusick
  15504. + Tue Dec 17 08:36:59 1985  /mtr <mrose@nrtc-gremlin>
  15505. +     uip/send.c: different alert announcement based on -forward
  15506. + Tue Dec 17 08:53:52 1985  /mtr <mrose@nrtc-gremlin>
  15507. +     conf/makefiles/sbr, sbr/cndfree.c: clean-up a bit
  15508. + Tue Dec 17 18:26:34 1985  /mtr <mrose@nrtc-gremlin>
  15509. +     sbr/m_getfld.c, uip/{format,mhl,pick}sbr.c: clean-up indirection
  15510. +         code for less tolerant compilers
  15511. +     uip/bbc.c: add -[no]rcfile switch
  15512. +     uip/msh.c: clean up a diagnostic
  15513. + Tue Dec 17 21:42:44 1985  /mtr <mrose@nrtc-gremlin>
  15514. +     conf/makefiles/sbr, h/mh.h, sbr/llib-lmh: cndfree() removed
  15515. +     sbr/{add,m_{delete,replace}}.c, uip/{mhl,vmh}sbr.c: replace cndfree
  15516. +     sbr/m_foil.c, uip/install-mh.c: compensate
  15517. + Wed Dec 18 13:37:09 1985  /mtr <mrose@nrtc-gremlin>
  15518. +     uip/bbc.c: make second, optimized pass to catch private bboards
  15519. +         that the user knows about
  15520. +     uip/popsbr.c: ditto
  15521. +     uip/popser.c: slight tune-up
  15522. + Wed Dec 18 20:27:38 1985  /mtr <mrose@nrtc-gremlin>
  15523. +     uip/slocal.c: minor touch up
  15524. +     uip/umhook.c: moved from zotnet/mf
  15525. + Wed Dec 18 22:51:58 1985  /mtr <mrose@nrtc-gremlin>
  15526. +     uip/bbc.c: optimize on calling mshproc, check size of maildrop
  15527. +         first; if empty, don't invoke it!
  15528. + Thu Dec 19 08:16:54 1985  /mtr <mrose@nrtc-gremlin>
  15529. +     uip/refile.c: better diagnostic from Fred Blonder
  15530. + Thu Dec 19 22:34:23 1985  /mtr <mrose@nrtc-gremlin>
  15531. +     zotnet/mts/client.c: #ifdef BIND code when no gethostent()
  15532. +     conf/{mh-gen.8,doc/mh-tailor.rf}: document it
  15533. + Thu Dec 19 23:58:44 1985  /mtr <mrose@nrtc-gremlin>
  15534. +     Release MH 6.2 to selected sites, including Berkeley for 4.3BSD testing
  15535. + Sun Dec 29 19:58:43 1985  /mtr <mrose@nrtc>
  15536. +     zotnet/mts/client.c: fix #ifdef BIND stuff a bit
  15537. +     h/mshsbr.h, uip/{mhlsbr,msh,mshcmds}.c: try to fix lost peer
  15538. +         problems...
  15539. +     conf/doc/vmh.rf: update
  15540. +     zotnet/drop/lock.c: not returning right errno
  15541. +     uip/dropsbr.c: ditto, plus not trying enough
  15542. +     conf/makefiles/doc: "make tar" forgetting tmac.h
  15543. +     uip/addrsbr.c: strcpy de-referencing NULL
  15544. +     uip/refile.c: got rid of a spurious \n (!!)
  15545. +     conf/examples/{udel,nrtc-mtr}: new files
  15546. +     h/mh.h, sbr/m_{convert,gmsg}.c, uip/{msh,rcvstore,refile}.c: fix
  15547. +         LOWSEL logic
  15548. +     uip/vmh.c: fix slight bug in sideground handling (misspelled
  15549. +         #ifdef, oops!)
  15550. +     conf/{mh-gen.8,config/mts.c},mts/*/hosts.c: remove the NETWORK option
  15551. + Mon Dec 30 20:03:25 1985  /mtr <mrose@nrtc>
  15552. +     conf/Makefile: options mangled(!?!)
  15553. +     uip/msh.c: if update of mailbox fails, it gets zero'd(!!)
  15554. +         (oops, not checking error condition)
  15555. +     support/pop/popser.c: if update of mailbox fails, clean-up
  15556. +         correctly (no zero problem here!)
  15557. +     uip/inc.c: on truncate of maildrop, remove mailbox map (XXX)
  15558. +     conf/makefiles/uip, uip/{send,whatnowsbr}.c: move send into
  15559. +         the WhatNow shell
  15560. +     uip/sendsbr.c: new file
  15561. +     conf/doc/whatnow.rf: update
  15562. + Tue Dec 31 10:13:44 1985  /mtr <mrose@nrtc>
  15563. +     conf/doc/vmh.rf: back-down last update
  15564. +     conf/mh-gen.8: forgot an \&
  15565. +     conf/examples/nrtc-{gw,mtr}, h/rcvmail.h: tsk, NRTC running an old
  15566. +         MMDF-II
  15567. + Tue Dec 31 13:53:14 1985  /mtr <mrose@nrtc>
  15568. +     conf/doc/whatnow.rf, uip/whatnowsbr.c: remove "headers" option
  15569. +     conf/doc/ADMIN.rf: clear-up post -debug documentation
  15570. +     conf/doc/{mh-chart,send,post}.rf, uip/{post,send,whatnowsbr}.c: remove
  15571. +         -[no]remove switches
  15572. +     uip/{repl,post}.c: some touch-ups
  15573. + Tue Dec 31 19:16:23 1985  /mtr <mrose@nrtc>
  15574. +     zotnet/tws/{dtime,dtimep}.c: dst fix-ups
  15575. +     conf/doc/send.rf: append, not prepend
  15576. +     uip/rmail.c: slight touch-up
  15577. +     uip/ap.c: oops, not printing all info
  15578. +     zotnet/mf/mf.c: botching trailing comment handling!
  15579. +     uip/scansbr.c: have cpy() omit trailing >>blank<<
  15580. +     sbr/m_gmsg.c: not zero'ing msgstats[] under non-MTR code
  15581. + Tue Dec 31 22:23:43 1985  /mtr <mrose@nrtc>
  15582. +     conf/doc/mhook.rf: minor typos
  15583. +     miscellany/rcvtrip/*: update
  15584. + Tue Dec 31 23:21:21 1985  /mtr <mrose@nrtc>
  15585. +     uip/mhlsbr.c: a bit more pipe trickyness (this gets old real fast)
  15586. +     conf/doc/ADMIN.rf: talk about popd and /etc/rc.local
  15587. +     papers/{myths,mznet}/Makefile: update
  15588. +     uip/bbc.c: augment XTND2 botch diagnostic
  15589. +     uip/msh.c: if popd says BBoard-ID: for a message is 0, read it
  15590. +         ourselves
  15591. + Fri Jan  3 13:11:03 1986  /mtr <mrose@nrtc-gremlin>
  15592. +     uip/bbc.c: SIGTSTP race condition, #undef for now
  15593. + Sun Jan  5 20:06:03 1986  /mtr (agent: Marshall Rose) <uci@dewey>
  15594. +           -- Interface TTI TMA to MH #6.2 --
  15595. +     [ N.B.: The TTI TMA is NOT in the public domain; the MH support for
  15596. +         the TTI TMA IS in the public domain! ]
  15597. +     conf/{mh-gen.8,mhconfig.c,doc/ADMIN.rf}: support "tma on"
  15598. +     conf/makefiles/{doc,uip}: ditto
  15599. +     Makefile: for the moment
  15600. + Mon Jan  6 15:25:20 1986  /mtr <mrose@nrtc-gremlin>
  15601. +     uip/{msh,mshcmds}.c: work on refile
  15602. +     uip/{vmh,msh}.c: support FAST quit (no final refresh on
  15603. +         updated mailbox)
  15604. + Tue Jan  7 15:06:05 1986  /mtr <mrose@nrtc-gremlin>
  15605. +     uip/bbc.c: got the SIGTSTP problem, now wait on child to stop prior
  15606. +         to stopping ourselves...
  15607. + Wed Jan  8 23:16:10 1986  /mtr <mrose@nrtc-gremlin>
  15608. +     uip/trmsbr.c: better defaults for "li" and "co"
  15609. + Thu Jan  9 15:29:09 1986  /mtr <mrose@nrtc-gremlin>
  15610. +            -- Fixes Suggested by Craig Partridge --
  15611. +     support/bboards/mmdfII/bboards/mmdfonly.h: if V4_2BSD on, set BSD42
  15612. +     conf/doc/{mhl,show}.rf: talk more about moreproc
  15613. +     uip/mhlsbr.c: have INTR work as advertised
  15614. +     uip/{send,whatnowsbr}.c: link on dist botched, oops!
  15615. + Thu Jan  9 16:31:28 1986  /mtr <mrose@nrtc-gremlin>
  15616. +     uip/mshcmds.c: don't rmm() messages which don't get refiled
  15617. +     uip/vmh.c: truncate stuff on Scan window (finally)
  15618. +     uip/scansbr.c: work on diagnostics a bit
  15619. + Thu Jan  9 22:37:29 1986  /mtr <mrose@nrtc-gremlin>
  15620. +     MH 6.2 is official, awaiting enhancements Berkeley!
  15621. + Fri Jan 10 10:17:57 1986  /mtr <mrose@nrtc-gremlin>
  15622. +     uip/sbboards.c: botch multiple bboard handling (forgot to rewind
  15623. +         input, thanks to Larry Henry)
  15624. +     support/bboards/mmdfII/bboards/bb_wtmail.c: not handling errors
  15625. +         right
  15626. +     sbr/cpydgst.c: stay symmetric with change to bb_wtmail.c, the code
  15627. +         worked fine, adding matching braces for clarity (!!)
  15628. + Sun Jan 12 14:01:25 1986  /mtr <mrose@nrtc-gremlin>
  15629. +     miscellany/mh-e: new version from James Larus
  15630. + Sun Jan 12 22:58:34 1986  /mtr <mrose@nrtc-gremlin>
  15631. +     uip/bbc.c: getbbvis a bit too agressive, use popd algorithm
  15632. + Wed Jan 15 04:43:33 1986  /mtr <mrose@nrtc-gremlin>
  15633. +     miscellany/netnews/: more stuff
  15634. + Wed Jan 15 18:44:32 1986  /mtr <mrose@nrtc-gremlin>
  15635. +     uip/addrsbr.c: ismymbox() losing under #ifdef DUMB, oops!
  15636. + Wed Jan 15 19:03:54 1986  /mtr <mrose@nrtc-gremlin>
  15637. +     COVER-LETTER: update
  15638. + Wed Jan 15 23:15:54 1986  /mtr <mrose@nrtc-gremlin>
  15639. +     support/pop/popsbr.c: pophack on PASS command
  15640. + Fri Jan 17 13:19:23 1986  /mtr <mrose@nrtc-gremlin>
  15641. +     uip/ali.c: add -noalias for RaJ
  15642. + Wed Jan 22 11:13:08 1986  /mtr <mrose@nrtc-gremlin>
  15643. +     support/pop/popwrd.c: squash bug
  15644. +     h/mh.h: remove sigmask definition
  15645. +     uip/{bbc,vmh}.c: add sigmask if not defined in <signal.h>
  15646. +         (4.3BSD finally wised up!)
  15647. + Sun Jan 26 16:57:18 1986  /mtr <mrose@nrtc-gremlin>
  15648. +     {conf/makefiles/uip,uip/post.c}: lint touch-up
  15649. +     conf/doc/{inc,mh-chart,send,post}.rf: add the #ifdef TMA stuff
  15650. +     sbr/m_remsg.c: tuning
  15651. +     uip/mark.c: re-arrange debug output slightly
  15652. +     h/mh.h: add some padding to fix some m_remsg bugs
  15653. +     uip/{inc,rcvstore}.c: oops, mp -> hghmsg not keeping pace with
  15654. +         m_remsg!
  15655. + Mon Jan 27 17:51:07 1986  /mtr <mrose@nrtc-gremlin>
  15656. +     uip/whatnowsbr.c: forgot to put -[no]push for built-in send
  15657. +     h/addrsbr.h, uip/{addrsbr,post}.c: introduce auxformat(), the
  15658. +         back-end to adrformat(); post calls auxformat directly in
  15659. +         certain cases
  15660. +     uip/{dp,forw}.c: was cheating on adrformat, now on auxformat
  15661. + Fri Jan 31 13:25:17 1986  /mtr <mrose@nrtc-gremlin>
  15662. +     COVER-LETTER: update
  15663. +     support/general/mhl.format: Remove length/width constraints
  15664. + Sun Feb  2 14:01:28 1986  /mtr <mrose@nrtc-gremlin>
  15665. +     zotnet/tws/dtime.c: twsort() fix from John Romine for ALTOS
  15666. +     uip/addrsbr.c: smarter ismymbox for default case
  15667. +     conf/{mh-gen.8,doc/repl.rf}, uip/repl.c: add #ifdef ATHENA code
  15668. + Sun Feb  2 20:47:36 1986  /mtr <mrose@nrtc-gremlin>
  15669. +     miscellany/replies/: new directory
  15670. + Mon Feb  3 11:21:49 1986  /mtr <mrose@nrtc-gremlin>
  15671. +     uip/whatnowsbr.c: oops, slight dist botch
  15672. +     support/general/mhl.format: make date display user-friendly
  15673. +     conf/mh-gen.8: clean-up descriptions of options
  15674. +     uip/sbboards.c: normalize code wrt to MMDF-II BBoards channel
  15675. +     uip/msh.c: when running under vmh and not in control of TTY,
  15676. +         ignore TSTP so BPOP can spool ahead!
  15677. +     papers/{usenix/usenix,multifarious/multifarios,trusted/trusted}.tex:
  15678. +         fix up banners a bit
  15679. + Wed Feb  5 09:32:08 1986  /mtr <mrose@nrtc-gremlin>
  15680. +     support/bboards/mmdfII/READ-ME: update
  15681. + Wed Feb  5 11:25:05 1986  /mtr <mrose@nrtc-gremlin>
  15682. +     
  15683. +     MH 6.3 #1[UCI] (nrtc-gremlin) is official, still awaiting Berkeley
  15684. +         enhancements
  15685. + Wed Feb  5 14:42:55 1986  /mtr <mrose@nrtc-gremlin>
  15686. +     zotnet/tws/{tws.h,dtime.c}: new argument to dasctime()
  15687. +     uip/{format,pick}sbr.c: make use of it
  15688. + Sun Feb  9 22:14:10 1986  /mtr <mrose@nrtc-gremlin>
  15689. +     support/pop/syslog.c: #ifdef BSD43 means use standard syslog
  15690. + Sun Feb 16 15:40:20 1986  /mtr <mrose@nrtc-gremlin>
  15691. +     sbr/m_setvis.c: oops, fix-up unseen sequence stuff
  15692. +     uip/whatnowsbr.c: oops, a couple of typos
  15693. + Sun Feb 16 19:11:33 1986  /mtr <mrose@nrtc-gremlin>
  15694. +     -- Incorporate Berkeley enhancements, courtesy of Van Jacobson --
  15695. +     h/{format,scan}sbr.h: updated for new formatsbr stuff
  15696. +     h/mh.h: updated for new m_getfld
  15697. +     conf/MH: new default file
  15698. +     conf/config/config.c: support spost under BERK and SENDMTS
  15699. +     conf/mhconfig.c: support new zotnet/fmt/ directory
  15700. +     conf/makefiles/uip: support spost
  15701. +     conf/makefiles/zotnetM: support new zotnet/fmt/ directory
  15702. +     conf/makefiles/zotnet/fmt: new Makefile
  15703. +     conf/makefiles/zotnet/tws: support for new lex-based date parser
  15704. +     sbr/m_gmsg.c,uip/msh.c: change init of READONLY
  15705. +     sbr/m_getfld.c: re-written, super optimized!
  15706. +     support/general/{digestcomps,mhl.digest,mhl.forward,scan.*}: use
  15707. +         new fmt stuff
  15708. +     zotnet/fmt/: new directory
  15709. +     zotnet/tws/{dtimep.lex,lexedit.sed,lexstring.c}: new files
  15710. +     zotnet/tws/dtime.c: update
  15711. +     uip/{forw,scan,scansbr}.c: use new format stuff
  15712. +     uip/{inc,mhlsbr,mshcmds,replsbr}.c: use new format stuff
  15713. +     uip/trmsbr.c: use stderr for ioctl()s
  15714. +     uip/spost.c: new file
  15715. +     uip/{addr,format}sbr.c: remove, they're in zotnet/fmt/
  15716. + Sun Feb 16 23:04:34 1986  /mtr <mrose@nrtc-gremlin>
  15717. +     zotnet/fmt/: move into sbr/ to avoid loading problems
  15718. +     sbr/{addrsbr,formatsbr,fmtcompile,formataddr}.c: new files
  15719. +     h/fmtcompile.h: new file
  15720. +     conf/makefiles/{sbr,zotnetM}: update
  15721. +     sbr/llib-lmh: update
  15722. + Mon Feb 17 20:14:35 1986  /mtr <mrose@nrtc-gremlin>
  15723. +     support/general/scan.{time,size}: mday/month inverted
  15724. +     sbr/{formatsbr,fmtcompile}.c: bring upto date with MH 6.3+
  15725. +     sbr/formatsbr.c: missing tzone/sday/dst handling!
  15726. +     h/scansbr.h: slight update
  15727. +     uip/scansbr.c: try using formataddr() routine to do "correct"
  15728. +         formatting of scan'd addresses, didn't work! use friendly
  15729. +     zotnet/tws/dtimep.lex: tsk, use lint!  also, fix numeric timezones
  15730. +     sbr/addrsbr.c: some ismymbox fixes for non-BERK code (from 6.3)
  15731. +     sbr/formatsbr.c: not priming the pump!
  15732. +     h/fmtcompile.h, sbr/{formatsbr,fmtcompile}.c: add "friendly"
  15733. +     support/general/scan.time2: call it scan.timely
  15734. +     conf/makefiles/support/general: support scan.timely
  15735. + Tue Feb 18 01:13:51 1986  /mtr <mrose@nrtc-gremlin>
  15736. +     h/formatsbr.h: updates from Van
  15737. + Tue Feb 18 02:15:00 1986  /mtr <mrose@nrtc-gremlin>
  15738. +     uip/bbc.c: upgrade for new m_getfld()
  15739. +     support/general/scan.*, h/scansbr.h: still more changes
  15740. +     support/general/replcomps: still more changes
  15741. + Tue Feb 18 22:14:51 1986  /mtr <mrose@nrtc-gremlin>
  15742. +     sbr/m_getfld.c: eom_action() lacking argument
  15743. +     sbr/m_getfld.c: not working right on packf'd files
  15744. +     uip/{msh,mshcmds}.c: under BPOP, need to fix things so m_getfld()
  15745. +         doesn't dump core!
  15746. + Wed Feb 19 00:16:55 1986  /mtr <mrose@nrtc-gremlin>
  15747. +     uip/dist.c, support/general/distcomps, sbr/fmtcompile.c: updates
  15748. +         from Van
  15749. +     sbr/formatsbr.c: remove ismymbox prime
  15750. +     sbr/fmtcompile.c: use adios(), not exit()!
  15751. + Wed Feb 19 00:56:30 1986  /mtr <mrose@nrtc-gremlin>
  15752. +     sbr/m_getfld.c: different fix for packf'd files from Van
  15753. + Wed Feb 19 01:55:40 1986  /mtr <mrose@nrtc-gremlin>
  15754. +     h/mh.h: add msg_* vars in m_getfld() as externs
  15755. +     uip/{msh,{repl,scan}sbr}.c: remove msg_* declarations
  15756. +     sbr/m_getfld.c: add a bit of BODYEOF support (without slowing it
  15757. +         down, wouldn't want to upset Van!)
  15758. + Wed Feb 19 03:11:42 1986  /mtr <mrose@nrtc-gremlin>
  15759. +     sbr/{formataddr,fmtcompile,m_{draft,getfld,maildir},printsw,pwd}.c:
  15760. +         lint it
  15761. +     uip/{formatsbr,forw,msh,replsbr,scan,scansbr,spost}.c: lint it
  15762. +     support/pop/popser.c: lint it
  15763. +     sbr/formatsbr.c: remove MHFMTDEBUG code
  15764. +     */Makefile: depend 'em
  15765. + Wed Feb 19 10:50:04 1986  /mtr <mrose@nrtc-gremlin>
  15766. +     papers/mh6.4: new interim documentation directory, for 4.3BSD
  15767. +     conf/doc/{MH,ap,dp,mh,mh-chart,mhl,repl,scan}.rf: update
  15768. +     conf/doc/mh-format.rf: new file
  15769. +     support/general/replcomps: oops, should call formataddr on all
  15770. +         addrs
  15771. + Thu Feb 20 08:07:49 1986  /mtr <mrose@nrtc-gremlin>
  15772. +     uip/{a,d}p.c: start working on it
  15773. +     h/formatsbr.h: new variable fmt_norm
  15774. +     sbr/formatsbr.c: use it
  15775. +     h/fmtcompile.c, sbr/{fmtcompile,formatsbr}.c: define "pretty"
  15776. +     sbr/formataddr.c: sight touch-up
  15777. +     uip/formatsbr.c: oops, bug in PUTD()
  15778. +     uip/{fmtcompile,formatsbr}.c: init mn structures in case of error.
  15779. +         This is still buggy since: 1) the structure still doesn't get
  15780. +         reset on errors, and 2) you can still dereference nulls
  15781. +     zotnet/tws/dtimep.lex: slight touch-up
  15782. + Thu Feb 20 19:55:20 1986  /mtr <mrose@nrtc-gremlin>
  15783. +     uip/mhlsbr.c: add formatsbr support
  15784. +     sbr/addrsbr.c: use better default matching in ismymbox
  15785. +     miscellany/mtrenv: update
  15786. +     support/general/mhl.*: update
  15787. + Thu Feb 20 22:57:33 1986  /mtr <mrose@nrtc-gremlin>
  15788. +     
  15789. +     MH 6.4 #1[UCI] (nrtc-gremlin) made available to Van Jacobson
  15790. +         for inclusion in 4.3BSD UNIX
  15791. + Sun Feb 23 13:59:46 1986  /mtr <mrose@nrtc-gremlin>
  15792. +     sbr/m_gmsg.c: big bug fix from Terry West.  Thanks, Terry!
  15793. +     h/strings.h: System5 bcopy-equivalents from Doug Gwyn
  15794. +     zotnet/tws/tws.h: support #ifdef ATZ
  15795. +     conf/makefiles/uip: slight lint botch
  15796. + Mon Feb 24 17:14:39 1986  /mtr <mrose@nrtc-gremlin>
  15797. +     uip/inc.c: have -host/-file ask if file doesn't exist
  15798. +     uip/{packf,mshcmds}.c: ditto
  15799. + Tue Feb 25 08:08:43 1986  /mtr <mrose@nrtc-gremlin>
  15800. +     uip/burst.c: another realloc() fix from Terry West
  15801. +     sbr/vfgets.c: ditto
  15802. +     support/pop/popser.c: enhancmenets from Dave Cohrs
  15803. +     conf/doc/pop5.rf: document it
  15804. +     conf/mhconfig.c: support "debug" directive
  15805. +     makefiles/*: use it
  15806. + Tue Feb 25 09:47:09 1986  /mtr <mrose@nrtc-gremlin>
  15807. +     uip/{scan,mshcmds}.c: slight touch-ups
  15808. +     uip/mhlsbr.c: fix up SIGPIPE handling, again
  15809. +     support/general/scan.time: fix up for numeric timezone
  15810. +     uip/scansbr.c: re-support "encrypted"
  15811. +     uip/msh.c: add "exit" command for Dave Farber
  15812. +     miscellany/convert: new directory
  15813. + Tue Feb 25 17:45:28 1986  /mtr <mrose@nrtc-gremlin>
  15814. +     h/mshsbr.h, uip/msh*.c: add direct folder support for symmetry's
  15815. +         sake, ugh!
  15816. + Wed Feb 26 21:05:46 1986  /mtr <mrose@nrtc-gremlin>
  15817. +     uip/sendsbr.c: better diagnostics when post fails
  15818. + Thu Feb 27 22:12:53 1986  /mtr <mrose@nrtc-gremlin>
  15819. +                  -- Van sends updates --
  15820. +     conf/makefiles/uip, h/fmtcompile.h,
  15821. +     sbr/{format{addr,sbr},fmtcompile,addrsbr}.c,
  15822. +     support/general/replcomps, uip/{repl,mhl,scan,whatnow}sbr.c
  15823. + Thu Feb 27 22:16:43 1986  /mtr <mrose@nrtc-gremlin>
  15824. +     sbr/formataddr.c: remove <strings.h>
  15825. +     sbr/addrsbr.c: Van doesn't like "user*" instead of "user" as the
  15826. +         default is-my-mailbox for BERK.  Since he's the BERK-author, I'll
  15827. +         assume he knows what he's doing...
  15828. +     support/general/replcomps: Use "tws", instead of "pretty" for
  15829. +         in-reply-to:
  15830. +     uip/whatnowsbr.c: If -draft{folder,message} and -nodraftfolder are
  15831. +         added as no-ops, make them "hidden" from -help output
  15832. +     uip/{{a,d}p,forw,mhlsbr}.c: update
  15833. + Mon Mar  3 10:18:40 1986  /mtr <mrose@nrtc-gremlin>
  15834. +                -- Van sends fixes to my updates --
  15835. +     uip/mshcmds.c: not resetting scansbr for formatting
  15836. +     uip/scansbr.c: oops, typo!
  15837. + Mon Mar  3 16:53:19 1986  /mtr <mrose@nrtc-gremlin>
  15838. +     uip/sendsbr.c: oops, close() on an uninitialized variable! (thanks
  15839. +         to Jim Koda)
  15840. + Tue Mar  4 08:15:17 1986  /mtr <mrose@nrtc-gremlin>
  15841. +                -- Van sends fixes to my updates --
  15842. +     uip/mhlsbr.c: not resetting mhlsbr for formatting
  15843. +     zotnet/tws/dtimep.lex: not getting MIL-TZ's right
  15844. + Tue Mar  4 09:53:31 1986  /mtr <mrose@nrtc-gremlin>
  15845. +     papers/usenix/: change to realwork/
  15846. + Wed Mar  5 12:48:58 1986  /mtr <mrose@nrtc-gremlin>
  15847. +     dist/READ-ME: oops, forgot usenix name change
  15848. +     conf/makefiles/uip: hmm, interesting loader problem
  15849. + Thu Mar  6 13:36:26 1986  /mtr <mrose@nrtc-gremlin>
  15850. +     uip/addrsbr.c: yet another fix for ismymbox()
  15851. +     uip/replsbr.c: #ifdef ISI code to avoid duplicate replies (due to
  15852. +         Jim Koda)
  15853. + Sun Mar  9 14:04:26 1986  /mtr <mrose@nrtc-gremlin>
  15854. +     conf/mh-gen.8: add a line about chown and sys5
  15855. +     sbr/m_convert.c: better BADRNG diagnostic
  15856. +     uip/mshcmds.c: oops, typo
  15857. + Sun Mar  9 14:06:54 1986  /mtr <mrose@nrtc-gremlin>
  15858. +     h/scansbr.h, sbr/fmtcompile.c: better versions from Van
  15859. +     support/general/{replcomps,scan.timely}: better versions from Van
  15860. +         (snuck the %pretty instead of %tws in, eh Van?)
  15861. +     support/general/{digestcomps,mhl.forward,scan.{size,time}}: update
  15862. + Sun Mar  9 18:52:37 1986  /mtr <mrose@nrtc-gremlin>
  15863. +     h/scansbr.h, support/general/{digestcomps,mhl.forward,scan.*}: update
  15864. + Sun Mar  9 20:09:35 1986  /mtr <mrose@nrtc-gremlin>
  15865. +     zotnet/bboards/bboards.h: add BB_REMOTE flag for bbc
  15866. +     uip/bbc.c: support BB_REMOTE, under #ifdef MTR for the moment
  15867. +     uip/bbc.c: allow bb_aka (again?!?)
  15868. + Mon Mar 10 00:43:19 1986  /mtr <mrose@nrtc-gremlin>
  15869. +     uip/{msh,mshcmds}.c: packf hack, ala refile hack
  15870. +     uip/{post,rcvdist}.c, support/bboards/mmdfII/bboards/bb_wtmail.c:
  15871. +         MMDF-II nameserver support from Steve Kille
  15872. + Mon Mar 10 10:17:29 1986  /mtr <mrose@nrtc-gremlin>
  15873. +     {sbr/formatsbr,uip/scansbr}.c: more optimizations from Van!
  15874. +     sbr/m_getfld.c: Van fixes problems due to losing vanilla-4.2 C
  15875. +         optimizer!
  15876. +     sbr/m_getfld.c: slight touch-up by MTR
  15877. +     uip/bbc.c: remove #ifdef MTR bracketing, code works fine
  15878. +     uip/refile.c: slight touch-ups
  15879. +     sbr/m_getfld.c: on xxxERR returns, forgetting to zero value buffer
  15880. + Mon Mar 10 18:08:37 1986  /mtr <mrose@nrtc-gremlin>
  15881. +     uip/post.c: fix handling of (in)visible addresses
  15882. +     uip/rcvdist.c: re-do to use format facility
  15883. +     uip/{replsbr,forw}.c: touch-ups
  15884. +     conf/config/config.c, h/mh.h: new variable rcvdistcomps
  15885. +     conf/{makefiles/{uip,support/general},doc/mhook.rf}: update
  15886. +     sbr/m_getfld.c: bstring() support for non BSD42, SYS5 systems
  15887. +     conf/doc/ADMIN.rf: update
  15888. + Tue Mar 11 19:43:27 1986  /mtr <mrose@nrtc-gremlin>
  15889. +     h/dropsbr.h, uip/dropsbr.c: new routines mbx_read() and mbx_write()
  15890. +     uip/{msh,mshcmds}.c, support/pop/popser.c: use it
  15891. +     h/{addr,format,scan}sbr.h, sbr/addrsbr.c: slight touch-up
  15892. +     uip/inc.c: slight touch-up
  15893. + Sun Mar 16 15:20:27 1986  /mtr <mrose@nrtc-gremlin>
  15894. +     miscellany/mem: appointment diary support from Ken Yap
  15895. + Wed Mar 19 23:00:53 1986  /mtr <mrose@nrtc-gremlin>
  15896. +     support/pop/popser.c: one last fix for ENOENT mailboxes
  15897. + Wed Mar 19 23:12:54 1986  /mtr <mrose@nrtc-gremlin>
  15898. +                -- Changes for MMDF-IIb --
  15899. +     uip/post.c, support/bboards/mmdfII/bboards/bb_wtmail.c: know about
  15900. +         new mm_winit protocol and RP_NS/RP_DOK responses
  15901. + Thu Mar 20 23:05:10 1986  /mtr <mrose@nrtc-gremlin>
  15902. +     uip/mhlsbr.c: mhl enhancement from JLR permitting a prefix string
  15903. +         for each line of the body (e.g, "component="    > ")
  15904. + Fri Mar 21 21:12:39 1986  /mtr <mrose@nrtc-gremlin>
  15905. +     conf/doc/{MH,mh-format}.rf: typos
  15906. + Sat Mar 22 11:51:45 1986  /mtr <mrose@nrtc-gremlin>
  15907. +              -- Fixes from Phyllis Kantar --
  15908. +     uip/dropsbr.c: typo
  15909. +     conf/doc/{send,pick}.rf: typos
  15910. +     conf/makefiles/doc: forgot $(OPTIONSn) in $(MAN1) definition
  15911. + Sat Mar 22 18:24:35 1986  /mtr <mrose@nrtc-gremlin>
  15912. +     uip/mhmail.c: handle -body better
  15913. + Mon Mar 31 15:07:26 1986  /mtr <mrose@nrtc-gremlin>
  15914. +     uip/replsbr.c: handle bad addresses with better diagnostics
  15915. + Wed Apr  2 17:17:32 1986  /mtr <mrose@nrtc-gremlin>
  15916. +     sbr/addrsbr.c: slight typo in comment
  15917. + Sun Apr  6 19:22:52 1986  /mtr <mrose@nrtc-gremlin>
  15918. +     uip/inc.c: forgot to initialize some FILE*'s; dumps core on
  15919. +         celerity
  15920. + Mon Apr  7 09:55:23 1986  /mtr <mrose@nrtc-gremlin>
  15921. +     mts/sendmail/smail.c: slight "client" check
  15922. + Wed Apr  9 12:04:56 1986  /mtr <mrose@nrtc-gremlin>
  15923. +              -- Van fixes some more bugs --
  15924. +     sbr/m_getfld.c: not handling buffer boundary cases right
  15925. +     uip/replsbr.c: not adding "," correctly when concatenating an
  15926. +         address string during message scan
  15927. +     sbr/formatsbr.c: mymbox test dumped core if address parse failed
  15928. +     h/{fmtcompile,formatsbr}.h, sbr/{fmtcompile,formatsbr}.c: more
  15929. +         enhancements
  15930. + Wed Apr  9 12:36:58 1986  /mtr <mrose@nrtc-gremlin>
  15931. +             -- MTR actually gets to fix something! --
  15932. +     sbr/m_getfld.c: messages with an empty body caused inc to
  15933. +         prematurely think the maildrop had reached EOF.  Believe it
  15934. +         or not, the mhmail fix last month exercised this!
  15935. + Wed Apr  9 22:08:37 1986  /mtr <mrose@nrtc-gremlin>
  15936. +     uip/vmh.c: output non-standard control characters in carat format
  15937. + Thu Apr 10 02:26:52 1986  /mtr <mrose@nrtc-gremlin>
  15938. +     Makefile: touch-up "make distribution"
  15939. +     conf/examples/nrtc-*-mtr: remove
  15940. +     conf/makefiles/uip: touch-up
  15941. +     conf/doc/MH.rf: add TMA stuff, conditionally
  15942. + Thu Apr 10 03:47:48 1986  /mtr <mrose@nrtc-gremlin>
  15943. +     sbr/m_getfld.c: Van fixes Marshall's fix
  15944. + Thu Apr 10 10:42:25 1986  /mtr <mrose@nrtc-gremlin>
  15945. +     uip/scansbr.c: recognize the 822 "Encrypted:" header instead of
  15946. +         doing a uprf() on the body
  15947. +     uip/{scan,mshcmds}.c: recognize SCNENC return from scan ()
  15948. + Thu Apr 10 15:06:59 1986  /mtr <mrose@nrtc-gremlin>
  15949. +     conf/config/bboards.*: mail reports to PostMaster
  15950. + Sat Apr 12 16:32:21 1986  /mtr <mrose@nrtc-gremlin>
  15951. +     uip/post.c: try to keep fcc:s under MH-directory so links are
  15952. +         maintained
  15953. + Mon Apr 14 22:56:46 1986  /mtr <mrose@nrtc-gremlin>
  15954. +     support/bboards/bbexp.c: not ending msh correctly, msh tried
  15955. +         to update the maildrop even though it was already locked
  15956. +         by bbexp
  15957. + Mon Apr 14 23:52:03 1986  /mtr <mrose@nrtc-gremlin>
  15958. +     sbr/m_getfld.c: locc() not range checking on cnt
  15959. + Thu Apr 17 13:25:20 1986  /mtr <mrose@nrtc-gremlin>
  15960. +     sbr/addrsbr.c: fix from Terry West, more alternate-mailbox misery
  15961. + Thu Apr 17 20:51:53 1986  /mtr <mrose@nrtc-gremlin>
  15962. +     zotnet/mts/lock.c: add some more #ifdefs to support stand-alone
  15963. +         locking library
  15964. +     conf/examples/udel*: update
  15965. +     papers/myths/: remove
  15966. +     conf/makefile/papers: update
  15967. + Mon Apr 21 10:22:09 1986  /mtr <mrose@nrtc-gremlin>
  15968. +     zotnet/mf/mf.c: sanity check in getadrx() on string to parse
  15969. + Mon Apr 21 17:31:43 1986  /mtr <mrose@nrtc-gremlin>
  15970. +     uip/{inc,post}.c: slight mods for TMA mods
  15971. +     conf/doc/mh-chart.rf: ditto
  15972. + Thu Apr 24 00:19:35 1986  /mtr <mrose@nrtc-gremlin>
  15973. +     conf/doc/mh-chart.rf: slight mods for TMA mods
  15974. + Thu Apr 24 10:34:06 1986  /mtr <mrose@nrtc-gremlin>
  15975. +     zotnet/mts/lock.c: lint touch-up
  15976. +     support/pop/popd.c: ditto
  15977. + Thu Apr 24 19:37:09 1986  /mtr <mrose@nrtc-gremlin>
  15978. +     conf/doc/ADMIN.rf: typos
  15979. + Thu Apr 24 20:13:28 1986  /mtr <mrose@nrtc-gremlin>
  15980. +     uip/msgchk.c: print out last read date
  15981. +     conf/makefiles/uip: add tws dependency
  15982. + Thu Apr 24 23:53:57 1986  /mtr <mrose@nrtc-gremlin>
  15983. +                   -- From Craig Partridge --
  15984. +     support/bboards/mmdfII/bboards/*: bug fixes for MMDF-IIb
  15985. +     conf/mh-gen.8: mention that MMDF-IIb has the BBoards distribution
  15986. + Fri Apr 25 00:01:50 1986  /mtr <mrose@nrtc-gremlin>
  15987. +     conf/ADMIN.rf: slight touch-up
  15988. + Fri Apr 25 10:47:19 1986  /mtr <mrose@nrtc-gremlin>
  15989. +     uip/trmsbr.c: use stdout (not stderr) for termcap checking
  15990. + Fri Apr 25 13:39:55 1986  /mtr <mrose@nrtc-gremlin>
  15991. +                -- From Craig Partridge --
  15992. +     support/bboards/mmdfII/bboards/getbbent.c: bad field in BBoards file
  15993. +         causes hang, note it and skip!
  15994. + Sun Apr 27 17:23:56 1986  /mtr <mrose@nrtc-gremlin>
  15995. +     uip/scansbr.c: recognition of 822 Encrypted: header a bit botched
  15996. +     h/scansbr.h, support/general/scan.*: support encrypted
  15997. + Mon Apr 28 21:00:21 1986  /mtr <mrose@nrtc-gremlin>
  15998. +             -- Yet Another Fix from Terry --
  15999. +     uip/dropsbr.c: another typo
  16000. + Tue Apr 29 20:17:11 1986  /mtr <mrose@nrtc-gremlin>
  16001. +     conf/doc/mhook.rf: extra tip with SendMail and slocal
  16002. + Thu May  1 15:30:07 1986  /mtr <mrose@nrtc-gremlin>
  16003. +                -- From Craig Partridge --
  16004. +     support/pop/mmdfII/pop/READ-ME: fixes
  16005. + Fri May  2 16:35:11 1986  /mtr <mrose@nrtc-gremlin>
  16006. +               -- More Bug Fixes from Van --
  16007. +     uip/scansbr.c: check return from fclose()
  16008. +     uip/inc.c: avoid locking/stat race condition
  16009. +     sbr/m_sync.c: lock signals out during update of sequences
  16010. + Fri May  2 17:02:01 1986  /mtr <mrose@nrtc-gremlin>
  16011. +     uip/show.c: WHATNOW botch fixed by Jim Valerio
  16012. + Sat May  3 01:37:15 1986  /mtr <mrose@nrtc-gremlin>
  16013. +     sbr/{m_{sync,update},pidwait}.c, uip/{bbc,sendsbr,vmh}: inspired
  16014. +         by Van's 4.2BSD signal optimizations
  16015. + Sat May  3 02:49:29 1986  /mtr <mrose@nrtc-gremlin>
  16016. +     zotnet/tws/{tws.h,dtime.c,dtimep.lex}: fixes for DST
  16017. +     conf/makefiles/zotnet/tws: add -n to lex's invocation
  16018. + Sun May  4 13:28:23 1986  /mtr <mrose@nrtc-gremlin>
  16019. +     uip/msgchk.c: change the "last read" message to use alpha-timezones
  16020. + Sun May  4 14:18:15 1986  /mtr <mrose@nrtc-gremlin>
  16021. +     support/general/replcomps: use %tws instead of %pretty
  16022. +     support/general/mhl.*: streamline slight
  16023. + Sun May  4 16:10:36 1986  /mtr <mrose@nrtc-gremlin>
  16024. +     conf/doc/mh.rf: forgot about TMA stuff
  16025. +     conf/makefiles/doc: forgot rcvstore
  16026. + Sun May  4 17:49:43 1986  /mtr <mrose@nrtc-gremlin>
  16027. +     sbr/pidwait.c, uip/{bbc,sendsbr,vmh}.c: back off signal handling
  16028. +         modifications
  16029. + Sun May  4 18:08:47 1986  /mtr <mrose@nrtc-gremlin>
  16030. +     MH 6.5 #1[UCI] (nrtc-gremlin) made available to Van Jacobson
  16031. +         for inclusion in 4.3BSD UNIX
  16032. + Mon May  5 13:32:37 1986  /mtr <mrose@nrtc-gremlin>
  16033. +     uip/trmsbr.c: try Van's version for a while
  16034. +     miscellany/patch: updates from Van
  16035. + Mon May  5 16:07:12 1986  /mtr <mrose@nrtc-gremlin>
  16036. +     support/bboards/mmdfII/bboards/bb_wtmail.c: patch for IDIOTIC change
  16037. +         in qu_rtxt()
  16038. + Wed May  7 13:16:45 1986  /mtr <mrose@nrtc-gremlin>
  16039. +     uip/post.c: modification for fcc:s broke stand-alone behavior for
  16040. +         daemons, etc.; use old method as a fall-back
  16041. +     sbr/m_foil.c: also improve modification a bit
  16042. +     support/pop/smtpd.c: dead weight
  16043. + Thu May  8 17:50:22 1986  /mtr <mrose@nrtc-gremlin>
  16044. +     support/bboards/bbexp.c: set the mode on the archive file if
  16045. +         creating it, since m_gmprot() isn't a good default for this
  16046. +         application
  16047. + Sun May 11 12:40:34 1986  /mtr <mrose@nrtc-gremlin>
  16048. +     miscellany/scripts/READ-ME: add amhmail description
  16049. +     miscellany/scripts/amhmail.sh: new script
  16050. + Mon May 12 09:12:39 1986  /mtr <mrose@nrtc-gremlin>
  16051. +     sbr/m_getfld.c: new version of matchc() from Van that doesn't
  16052. +         give the SUN indigestion
  16053. + Tue May 13 07:59:36 1986  /mtr <mrose@nrtc-gremlin>
  16054. +     uip/replsbr.c: some fixes from Van
  16055. + Tue May 13 15:14:07 1986  /mtr <mrose@nrtc-gremlin>
  16056. +                -- Some Fixes from Hokey --
  16057. +     uip/vmh.c: a few more SYS5 dependencies
  16058. +     zotnet/tws/dtimep.lex: added #include strings.h
  16059. +     conf/makefiles/zotnet/tws: added dependency for above
  16060. +     uip/post.c: pre-emptive reference of discard to help SYS5 loader
  16061. +     conf/examples/plus5: update
  16062. +     miscellany/less/Makefile: add SHELL=/bin/sh
  16063. +     sbr/m_getfld.c: slight redeclaration for SYS5
  16064. + Tue May 13 17:44:47 1986  /mtr <mrose@nrtc-gremlin>
  16065. +     sbr/{fmtcompile,formatsbr}.c, support/pop/popwrd.c,
  16066. +     uip/{ap,inc,rcvtty,post,spost,whatnowsbr}.c:
  16067. +         add some lint stuff
  16068. +     conf/makefiles/uip: better lint support for TMA
  16069. + Thu May 15 16:36:19 1986  /mtr <mrose@nrtc-gremlin>
  16070. +     uip/{inc,msgchk,post,send}.c: improve #define-dependent
  16071. +         switches declarations
  16072. + Thu May 15 17:09:34 1986  /mtr <mrose@nrtc-gremlin>
  16073. +     uip/msgchk.c, conf/doc/{mh-chart,msgchk}.rf: add -[no]date,
  16074. +         and -[no]notify type switches
  16075. + Tue May 20 19:09:15 1986  /mtr <mrose@nrtc-gremlin>
  16076. +     uip/scan.c: free'ing a static, tsk
  16077. + Tue May 20 22:51:13 1986  /mtr <mrose@nrtc-gremlin>
  16078. +                  -- From Steve Smith --
  16079. +     conf/examples/ridge: config file
  16080. +     sbr/{m_gmsg,pwd}.c: although SYS5, uses <ndir.h>
  16081. +     uip/show.c: not null-terminating argvector
  16082. +     uip/{bbc,vmh}.c: although SYS5, has SIGTSTP
  16083. +     uip/sbboards.c: pre-emptive reference of discard to help SYS5 loader
  16084. +     conf/{mh-gen.8,mhconfig.c}: add "oldload none"
  16085. + Wed May 21 10:10:21 1986  /mtr <mrose@nrtc-gremlin>
  16086. +     uip/{rcvdist,replsbr}.c: malloc/free fixes from Steve Smith
  16087. + Wed May 21 20:51:47 1986  /mtr <mrose@nrtc-gremlin>
  16088. +     conf/{mh-gen.8,doc/{ADMIN,MH}.rf, papers/*/*, COVER-LETTER: update
  16089. +         mail addresses
  16090. + Thu May 22 08:05:03 1986  /mtr <mrose@nrtc-gremlin>
  16091. +             -- Two New Documents from UCI --
  16092. +     conf/makefiles/{papers,dist}: update
  16093. +     dist/READ-ME: remove
  16094. +     conf/doc/MH.rf: update
  16095. +     papers/beginners: new paper "MH for Beginners"
  16096. +     papers/mh4mm: new paper "MH for MM Users"
  16097. + Thu May 22 08:13:17 1986  /mtr <mrose@nrtc-gremlin>
  16098. +     conf/mh-gen.rf: update
  16099. + Thu May 22 15:08:06 1986  /mtr <mrose@nrtc-gremlin>
  16100. +     support/general/replcomps: typo
  16101. + Tue May 27 19:35:38 1986  /mtr <mrose@nrtc-gremlin>
  16102. +     support/pop/popd.c: support for 4.3BSD syslog
  16103. + Wed May 28 12:44:21 1986  /mtr <mrose@nrtc-gremlin>
  16104. +     sbr/fmtcompile.c: allow literal '%'s in format files
  16105. + Wed May 28 16:56:40 1986  /mtr <mrose@nrtc-gremlin>
  16106. +     conf/examples/nrtc-gremlin: add -125 switch for GHS compiler
  16107. +     sbr/getans.c,uip/{mhlsbr,prompter,rcvtty,sendsbr}.c: a bit more
  16108. +         careful with the setjmp()
  16109. + Thu May 29 23:42:54 1986  /mtr <mrose@nrtc-gremlin>
  16110. +     support/general/scan.mailx: mailx scan format from Bob Simpson of
  16111. +         plus5
  16112. +     support/general/mhl.body: format from mtrenv
  16113. + Sun Jun  1 23:07:24 1986  /mtr <mrose@nrtc-gremlin>
  16114. +     uip/trmsbr.c: add sc_hardcopy()
  16115. +     uip/mhlsbr.c: use it so we don't fork a more on hardcopy ttys
  16116. +     conf/doc/mhl.rf: document it
  16117. + Fri Jun  6 10:56:40 1986  /mtr <mrose@nrtc-gremlin>
  16118. +     miscellany/less/screen.c: handle HP terminals better
  16119. + Tue 10 Jun 86 15:34    John Romine    <jromine@nrtc-gremlin>
  16120. +     h/scansbr.h: eliminate superfluous space from default format
  16121. +         string
  16122. + Fri 13 Jun 86 10:29    John Romine    <jromine@nrtc-gremlin>
  16123. +     h/scansbr.h, support/general/scan.{timely,time,size}: add ">>" at
  16124. +         end of body in format string
  16125. + Fri Jun 13 15:28:10 1986  /mtr <mrose@nrtc-gremlin>
  16126. +     sbr/addrsbr.c: another #ifdef BERK fix for the SUN
  16127. + Fri Jun 13 20:08:36 1986  /mtr <mrose@nrtc-gremlin>
  16128. +     uip/aliasbr.c: not testing for relative names correctly
  16129. + Sun Jun 15 14:20:10 1986  /mtr <mrose@nrtc-gremlin>
  16130. +     h/scansbr.h, support/general/scan.{timely,time,size}: remove JLR's
  16131. +         fix since it doesn't work right
  16132. + Mon Jun 16 19:56:09 1986  /mtr <mrose@nrtc-gremlin>
  16133. +     sbr/{m_gmsg,pwd}.c, uip/{bbl,conflict,folder,rmf}.c: add NDIR
  16134. +         compile-time option if -lndir include file is called <ndir.h>
  16135. +         instead of <dir.h> (non BSD systems)
  16136. +     h/local.h: new file to make this easier
  16137. + Tue Jun 17 10:44:06 1986  /mtr <mrose@nrtc-gremlin>
  16138. +     uip/trmsbr.c: no TIOCGWINSZ working on 4.2BSD ULTRIX!
  16139. + Tue Jun 17 14:21:08 1986  /mtr <mrose@nrtc-gremlin>
  16140. +     uip/scan.c: forgot to make -header always force ATZ behavior
  16141. + Tue Jun 17 15:23:27 1986  /mtr <mrose@nrtc-gremlin>
  16142. +     h/mh.h: add vfork for hpux
  16143. + Wed Jun 18 11:05:40 1986  /mtr <mrose@nrtc-gremlin>
  16144. +     support/bboards/bbexp.c: create archives in BBMODE format, private
  16145. +         bboards should have archives created by the BBoards user (just
  16146. +         like the standard file)
  16147. + Wed Jun 18 19:57:09 1986  /mtr <mrose@nrtc-gremlin>
  16148. +     uip/vmh.c: sanitize for 8-bit whacko characters
  16149. + Thu Jun 19 19:51:43 1986  /mtr <mrose@nrtc-gremlin>
  16150. +     zotnet/tws/dtimep.lex: fix spelling for august
  16151. + Mon Jun 23 20:45:35 1986  /mtr <mrose@nrtc-gremlin>
  16152. +     uip/vmh.c: Bob gives us another sys5 fix
  16153. + Sun Jun 29 21:11:30 1986  /mtr <mrose@nrtc-gremlin>
  16154. +     sbr/addrsbr.c: yet another fix for the SUN (yaffts)
  16155. +     conf/mhconfig.c: if both mts/smtp and options BERK, turn off
  16156. +         SMTP
  16157. + Tue Jul  8 10:50:39 1986  /mtr <mrose@nrtc-gremlin>
  16158. +     uip/scansbr.c: split-up a statement for the RT compiler
  16159. +     conf/mh-gen.8: add some stuff on POP
  16160. +     conf/doc/{ADMIN,popaka}.rf: ditto
  16161. + Fri Jul 11 10:50:31 1986  /mtr <mrose@nrtc-gremlin>
  16162. +     MH 6.5 official, out of beta, released for UCI distribution
  16163. + Tue Jul 15 20:26:05 1986  /mtr <mrose@nrtc-gremlin>
  16164. +     papers/{bboards/bboards,tutorial/tutorial}.tex: botched MTR's
  16165. +         address
  16166. + Sun Jul 27 11:52:37 1986  /mtr <mrose@nrtc-gremlin>
  16167. +     conf/doc/show.rf: typos
  16168. + Fri Aug  8 12:57:35 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16169. +     conf/config/config.c, h/mh.h, sbr/m_readefs.c, uip/mhlsbr.c:
  16170. +         add support for "faceproc"
  16171. + Mon Aug 11 10:10:33 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16172. +     uip/mhlsbr.c: choose default face from from: line
  16173. + Tue Aug 12 10:53:47 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16174. +     uip/mhlsbr.c: finally stabilize it
  16175. + Tue Aug 12 10:54:47 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16176. +     support/pop/popser.c: small fix from Dave Cohrs
  16177. + Thu Aug 14 22:25:23 1986  /mtr <mrose@nrtc-gremlin>
  16178. +     support/general/replcomps: add return-path to To: list
  16179. + Fri Aug 15 13:58:25 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16180. +     uip/vmh.c: slight clean-up
  16181. + Fri Aug 15 23:01:06 1986  /mtr <mrose@nrtc-gremlin>
  16182. +     sbr/advertise.c: slight touch-up
  16183. + Mon Aug 18 10:38:34 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16184. +     uip/wmh.c: new program--Windowing MH for Integrated Solutions
  16185. +         Graphics Workstations; not standardly installed for now since
  16186. +         requires special load libraries
  16187. +     conf/doc/wmh.rf: man page
  16188. +     conf/makefiles/uip: support wmh
  16189. + Wed Aug 20 14:16:12 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16190. +     conf/config/MakeBBoards: smarter rule
  16191. + Wed Aug 20 17:23:39 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16192. +     uip/mhlsbr.c: a bit less demanding on errors when processing the
  16193. +         face
  16194. + Thu Aug 28 19:39:47 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16195. +     uip/send.c: handle dist in a read-only folder
  16196. +     support/pop/popser.c: anonymous fix for DPOP/BPOP
  16197. + Fri Aug 29 09:08:15 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16198. +     uip/wmh.c: for pTTY() make original window the top one
  16199. + Tue Sep  2 15:27:34 1986  /mtr <mrose@nrtc-gremlin>
  16200. +     uip/{bbc,burst,popsbr}.c: ULTRIX loses on ferror() vs. feof()
  16201. +     sbr/vfgets.c: ditto
  16202. + Fri Sep  5 09:08:17 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16203. +     mts/sendmail/smail.c: define discard() as void
  16204. + Fri Sep  5 09:40:35 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16205. +     uip/msh.c: add hidden "advance" command
  16206. +     uip/wmh.c: use it
  16207. + Fri Sep  5 14:02:36 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16208. +     zotnet/bboards/bboards.h: add BB_SEEN to fix list-handling bug in bbc
  16209. +     uip/bbc.c: use it
  16210. + Mon Sep  8 12:47:58 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16211. +     conf/config/MakeBBoards: smarter
  16212. + Thu Oct  2 12:37:57 1986  /mtr <mrose@nrtc-gremlin>
  16213. +     support/pop/popd.c: fixes for 4.3BSD set setsockopt
  16214. + Mon Oct  6 12:07:02 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16215. +     conf/examples/encore: config file for Encore Multimax, from Mike
  16216. +         Iglesias of UCI
  16217. + Wed Oct  8 15:59:05 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16218. +     uip/vmh.c: more SYS5 mods from Bob Desinger
  16219. + Thu Oct  9 12:52:41 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16220. +     h/mh.h: make ruserpass nonsense based on NFS not SUN
  16221. + Thu Oct 30 12:57:52 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16222. +     sbr/formataddr.c, uip/replsbr.c: another realloc() bug found by
  16223. +         Terry West
  16224. + Thu Oct 30 13:03:02 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16225. +     uip/{rcvtty,ttyw}.c: if no BSD42, turn off TTYD
  16226. + Mon Nov  3 14:11:48 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16227. +     uip/msgchk.c: another SUN fix
  16228. + Mon Nov  3 15:21:38 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16229. +     sbr/m_sync.c: fix for sequent machines
  16230. + Mon Nov 10 08:12:16 1986  /mtr <mrose@nrtc-gremlin>
  16231. +             -- Stuff from Jef Poskanzer --
  16232. +     uip/forw.c: add -[no]dashmunging, a hidden option
  16233. +     uip/mhlsbr.c: add -[no]dashmunging, a hidden option
  16234. +     {conf/doc/mhl.rf,uip/mhlsbr.c}: add [no]split variable
  16235. + Mon Nov 10 16:57:41 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16236. +                 -- More stuff from Jef --
  16237. +     zotnet/tws/dtimep.lex: default timezone to localone one
  16238. + Fri Nov 14 17:25:23 1986  /mtr <mrose@nrtc-gremlin>
  16239. +     conf/doc/mhook: typo found by Phyl
  16240. + Fri Nov 21 14:33:28 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16241. +     sbr/smatch.c: deref null bug
  16242. + Sat Nov 22 20:36:31 1986  /mtr <mrose@nrtc-gremlin>
  16243. +     uip/bbc.c: set up time-bomb after HUP
  16244. + Tue Dec  2 13:57:41 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16245. +     support/bboards/bbtar.c: fix for sequent machines
  16246. + Wed Dec  3 22:03:58 1986  /mtr <mrose@nrtc-gremlin>
  16247. +     support/pop/popd.c: minor fix
  16248. + Mon Dec 15 11:11:32 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16249. +     uip/post.c: patch for MMDF-IIb submit
  16250. + Mon Dec 22 12:32:45 1986  /mtr (agent: Marshall Rose) <mother@killer-rat>
  16251. +                    -- From Stanford --
  16252. +     h/dropsbr.h, uip/dropsbr.c, support/pop/popser.c: support LAST
  16253. +         command in POP service
  16254. +     uip/{inc,mshcmds}.c: ditto
  16255. + Fri Jan  2 18:42:55 1987  /mtr <mrose@nrtc-gremlin>
  16256. +     uip/dropsbr.c: fixes
  16257. +     uip/msh.c, support/pop/popser.c: ditto
  16258. + Fri Jan  2 18:43:09 1987  /mtr <mrose@nrtc-gremlin>
  16259. +     zotnet/tws/dtimep.lex: ctime w/o TZ hack
  16260. + Fri Jan  2 23:41:19 1987  /mtr <mrose@nrtc-gremlin>
  16261. +     uip/rcvdist.c: touch-ups to sync with replsbr.c
  16262. +     uip/scansbr.c: trash trailing whitespace in header components for
  16263. +         formating
  16264. + Sat Jan  3 13:11:22 1987  /mtr <mrose@nrtc-gremlin>
  16265. +     conf/config/mts.c, mts/sendmail/hosts.c: BIND fix-up
  16266. + Sat Jan  3 15:03:00 1987  /mtr <mrose@nrtc-gremlin>
  16267. +     h/formatsbr.h: parenthesize better, use case-sensitive in
  16268. +         bucket search since hashing is case-sensitive
  16269. +     uip/{rcvdist,replsbr}.c: CT_ADDR hacks
  16270. + Sun Jan  4 11:16:54 1987  /mtr <mrose@nrtc-gremlin>
  16271. +     uip/mhlsbr.c: "extras" hack for Elz
  16272. *** /dev/null    Tue Dec 15 08:01:10 1992
  16273. --- papers/changes/Makefile    Wed Dec  2 14:00:15 1992
  16274. ***************
  16275. *** 0 ****
  16276. --- 1,46 ----
  16277. + ##############################################################################
  16278. + # @(#)$Id: Makefile,v 1.4 1992/12/02 22:00:09 jromine Exp $
  16279. + MAKE    =    make DESTDIR=$(DESTDIR) $(MFLAGS) -k
  16280. + SHELL    =    /bin/sh
  16281. + ##############################################################################
  16282. + #    Generation Rules
  16283. + ##############################################################################
  16284. + .SUFFIXES:    .ms .cat .doc .imp
  16285. + .ms.cat:;    itroff -t -ms $< > $@
  16286. + .ms.doc:;    nroff -ms $< > $@
  16287. + .cat.imp:;    catimp -i $@ $<
  16288. + ######################################################################
  16289. + #    Here it is...
  16290. + ######################################################################
  16291. + TARGETS    =    mh-changes.doc
  16292. + all:        mh-changes.doc
  16293. + doc:        mh-changes.doc
  16294. + i-all:    all true
  16295. +     lpr -t -J MH-changes mh-changes.cat
  16296. + true:;
  16297. + ##############################################################################
  16298. + #    Miscellaneous tasks
  16299. + ##############################################################################
  16300. + distribution:   clean
  16301. + unconfig clean:        unclean
  16302. +         rm -f *.cat *.dvi *.imp *.doc
  16303. + unclean:;    rm -f *.tmp _* :* core
  16304. *** /dev/null    Tue Dec 15 08:01:10 1992
  16305. --- papers/changes/mh-changes.ms    Mon Dec 14 16:25:37 1992
  16306. ***************
  16307. *** 0 ****
  16308. --- 1,1010 ----
  16309. + .\" @(#)$Id: mh-changes.ms,v 1.25 1992/12/15 00:25:33 jromine Exp $
  16310. + .\" Standard -ms macros
  16311. + .\" with the following changes
  16312. + .ds lq \\*Q
  16313. + .ds rq \\*U
  16314. + .\" remember to update date in text below
  16315. + .DA "December 14, 1992"
  16316. + .if n \{\
  16317. + .na
  16318. + .\}
  16319. + .nr PO 1i
  16320. + .po 1i
  16321. + .\" .EH ''Changes to MH 6.7'%'
  16322. + .\" .OH ''Changes to MH 6.7'%'
  16323. + .ds LH Changes to MH 6.8
  16324. + .ds CH
  16325. + .ds RH %
  16326. + .TL
  16327. + Changes to
  16328. + .br
  16329. + The RAND MH Message Handling System:
  16330. + .br
  16331. + UCI version MH 6.8
  16332. + .AU
  16333. + John L. Romine
  16334. + .AI
  16335. + Computing Support Group
  16336. + Department of Information and Computer Science
  16337. + University of California, Irvine
  16338. + Irvine, CA  92717\-3425
  16339. + .AB
  16340. + .PP
  16341. + This document describes the changes to the
  16342. + UCI version of the RAND MH system from MH 6.6
  16343. + to this release of MH 6.8.
  16344. + This document is meant to supplement,
  16345. + not supersede,
  16346. + the standard MH User's manual and MH Administrator's manual.
  16347. + .PP
  16348. + Comments concerning this documentation should be addressed to the
  16349. + mailbox \fBBug\-MH@ICS.UCI.EDU\fP, or \fBucbvax!ucivax!bug-mh\fP.
  16350. + .AE
  16351. + .SH
  16352. + ACKNOWLEDGEMENTS
  16353. + .LP
  16354. + The \fIMH\fP system described herein is
  16355. + based on the original RAND \fIMH\fP system.
  16356. + It has been extensively developed (perhaps too much so) by Marshall T. Rose
  16357. + and John L. Romine at the University of California, Irvine.
  16358. + Einar A. Stefferud, Jerry N. Sweet,
  16359. + and Terry P. Domae provided numerous suggestions
  16360. + to improve the UCI version of \fIMH\fP.
  16361. + .PP
  16362. + Of course,
  16363. + a large number of people have helped \fIMH\fP along.
  16364. + The list of \*(lq\fIMH\fP immortals\*(rq is too long to list here.
  16365. + For this release, numerous \fIMH\-Workers\fP sent in fixes and other
  16366. + changes.  A handful of courageous \fIMH\-Workers\fP volunteered
  16367. + to beta-test these changes; their help is particularly appreciated.
  16368. + .KS
  16369. + .SH
  16370. + DISCLAIMER
  16371. + .LP
  16372. + The Regents of the University of California wish to make it known that:
  16373. + .QP
  16374. + Although each program has been tested by its contributor,
  16375. + no warranty, express or implied,
  16376. + is made by the contributor or the University of California,
  16377. + as to the accuracy and functioning of the program
  16378. + and related program material,
  16379. + nor shall the fact of distribution constitute any such warranty,
  16380. + and no responsibility is assumed by the contributor
  16381. + or the University of California in connection herewith.
  16382. + .KE
  16383. + .KS
  16384. + .SH
  16385. + CONVENTIONS
  16386. + .LP
  16387. + In this document,
  16388. + certain formatting conventions are adhered to:
  16389. + .IP
  16390. + The names of
  16391. + \s-2UNIX\s+2
  16392. + commands, such as \fIcomp\fP
  16393. + are presented in \fIitalics\fP.
  16394. + .IP
  16395. + Arguments to programs, such as `msgs' and `\-nobell' are
  16396. + delimited by single-quotes.
  16397. + .IP
  16398. + Text that should be typed exactly as-is, such as 
  16399. + command lines (e.g., \*(lqfolder \-pack\*(rq),
  16400. + are delimited by double-quotes.
  16401. + .IP
  16402. + \s-2UNIX\s+2
  16403. + pathnames and envariables,
  16404. + such as \fB/usr/uci\fP and \fB$SIGNATURE\fP,
  16405. + are presented in \fBbold font\fP.
  16406. + .KE
  16407. + .ds LH Changes for MH 6.8
  16408. + .bp
  16409. + .SH
  16410. + CHANGES FOR MH 6.8
  16411. + .LP
  16412. + This is the current released version of \fIMH\fP
  16413. + as of December 14, 1992.  This release includes a number
  16414. + of bug fixes and internal changes to make the code more
  16415. + portable.
  16416. + Two new authentication methods are provided for the POP,
  16417. + and support for SVR4 shared libraries is complete.
  16418. + .PP
  16419. + The major user-visible change in this release is the incorporation
  16420. + of support for multi-media mail as specified by the
  16421. + Multi-purpose Internet Mail Extensions (\fBMIME\fP)
  16422. + RFC\ 1341.
  16423. + This allows you to include things like audio,
  16424. + graphics, and the like, in your mail messages.
  16425. + A new command, \fImhn\fP, 
  16426. + has been provided to support \fBMIME\fP and
  16427. + a detailed man page is provided in \fImhn\fP\|(1).
  16428. + .SH
  16429. + Documentation
  16430. + .LP
  16431. + The documentation has some general improvements, and
  16432. + the \fBREAD-ME\fP document has been re-organized
  16433. + to help \fIMH\fP administrators find the appropriate
  16434. + configuration options for their system.
  16435. + The \fBMakefile\fPs in the \fBpapers/\fP hierarchy have
  16436. + been changed to invoke \fITeX\fP as
  16437. + \*(lqtex\*(rq (instead of \*(lqtex82\*(rq).
  16438. + .LP
  16439. + The following new man pages are also available:
  16440. + .IP \fImhn\fP\|(1) \w'\fIpopauth\fP\|(8)'u+2n
  16441. + \fImhn\fP helps the user process multi-media mail.
  16442. + .IP \fImhparam\fP\|(1)
  16443. + \fImhparam\fP lets the user extract information from 
  16444. + the \fIMH\fP profile.
  16445. + .IP \fIpopauth\fP\|(8)
  16446. + the APOP database administration program (see below).
  16447. + .IP \fIpopi\fP\|(1)
  16448. + the POP initiator (see below).
  16449. + .IP \fIslocal\fP\|(1)
  16450. + fully documents \fIslocal\fP.  The \fImhook\fP(1) man page now
  16451. + documents only the \fIMH\fP receive-mail hooks.
  16452. + .SH
  16453. + Internal Changes
  16454. + .LP
  16455. + The \fIMH\fP source code is in the process of being
  16456. + cleaned up to make pedantic ANSI C compilers happy.
  16457. + Occurrences of \*(lqNULL\*(rq have been replaced by
  16458. + \*(lq0\*(rq where appropriate.
  16459. + Extra tokens after \*(lq#else\*(rq and \*(lq#endif\*(rq
  16460. + have been put inside comments (this is still in progress).
  16461. + The code should now compile cleanly on many more systems,
  16462. + specifically, more variants of SVR4.
  16463. + .PP
  16464. + The version of \fBtws/dtimep.c\fP which was included in 
  16465. + MH 6.7.2 was incompatible with the \fIlex\fP library
  16466. + on some systems, and has been removed.
  16467. + .PP
  16468. + A bug in the handling of blind lists inside alias
  16469. + files has been fixed.
  16470. + .KS
  16471. + .SH
  16472. + Post Office Protocol
  16473. + .LP
  16474. + There were three new options added to the POP.
  16475. + .IP APOP \w'APOP'u+2n
  16476. + This option indicates that the POP daemon will
  16477. + support the non-standard \fBAPOP\fP command which
  16478. + provides a challenge-based authentication system using
  16479. + the \fBMD5\fP message digest algorithm.
  16480. + .IP
  16481. + This option also causes the
  16482. + \fIpopauth\fP program to be installed, which
  16483. + allows the administrator to manipulate the \fBAPOP\fP
  16484. + authorization database.
  16485. + .KE
  16486. + .IP KPOP
  16487. + Support for KERBEROS with POP.
  16488. + This code builds
  16489. + \fIpopd\fP, \fIinc\fP and \fImsgchk\fP to support only the 
  16490. + \*(lqkpop\*(rq protocol.
  16491. + This code is still expiremental, but is available for 
  16492. + those sites wishing to test it.
  16493. + .IP MPOP
  16494. + This option indicates that the POP daemon will
  16495. + support the non-standard
  16496. + \fBXTND SCAN\fP command which provides performance
  16497. + enhancements when using the POP over low-speed connections.
  16498. + .IP
  16499. + This option also causes an interactive POP
  16500. + client program, \fIpopi\fP, to be compiled and installed.
  16501. + A man page for the \fIpopi\fP program is also provided.
  16502. + This option requires the configuration to
  16503. + have \*(lqbboards: pop\*(rq.
  16504. + .LP
  16505. + The APOP and MPOP non-standard POP
  16506. + facilities are documented in
  16507. + \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7),
  16508. + a book by Marshall T. Rose.
  16509. + For more details, see \fBsupport/pop/pop-more.txt\fR
  16510. + and the \fIAdministrator's Guide\fP.
  16511. + The APOP option peacefully co-exists with the standard POP,
  16512. + KPOP completely replaces the standard POP, and
  16513. + MPOP requires \*(lqbboards: pop\*(rq.
  16514. + .SH
  16515. + File Locking
  16516. + .LP
  16517. + The file locking code has been cleaned up to support
  16518. + three kinds of kernel-level file locking.  As appropriate
  16519. + for your system, include the
  16520. + LOCKF, FCNTL or FLOCK option.  For more
  16521. + details, see \fImh-tailor\fP\|(5).
  16522. + .SH
  16523. + .KS
  16524. + Configuration Directives
  16525. + .LP
  16526. + A number of new configuration directives have been added
  16527. + or changed.  The full details are given in the \fBREAD-ME\fP.
  16528. + .IP cp: \w'MAILGROUP'u+2n
  16529. + The command used to install new files if not \*(lqcp\*(rq.
  16530. + .IP ln:
  16531. + The command used to link files together in the source tree
  16532. + if not \*(lqln\*(rq.
  16533. + .IP mts:
  16534. + Full support for ZMAILER has been added.
  16535. + .IP popdir:
  16536. + The directory where \fIpopd\fP will be installed if not \fB/usr/etc\fP.
  16537. + .IP regtest:
  16538. + Set to \*(lqon\*(rq to prevent the hostname and compile
  16539. + date from being included in \fIMH\fP binaries.
  16540. + .IP sharedlib:
  16541. + You may now specify \*(lqsun4\*(rq or \*(lqsys5\*(rq 
  16542. + (for SVR4) shared libraries.
  16543. + .IP signal:
  16544. + Specifies the base type of the function returned by \fIsignal\fP\|().
  16545. + This was previously defined with \*(lqoptions TYPESIG\*(rq.
  16546. + .KE
  16547. + .LP
  16548. + Several `-D' options to \fIcc\fP have been added or changed:
  16549. + .IP APOP \w'MAILGROUP'u+2n
  16550. + Authenticated POP (see above).
  16551. + .IP AUX 
  16552. + Support for A/UX systems.
  16553. + .IP DBMPWD
  16554. + The DBM option has been renamed DBMPWD.
  16555. + .IP HESIOD
  16556. + Support for the HESIOD name server.
  16557. + .IP KPOP
  16558. + KERBEROS POP (see above).
  16559. + .IP LOCALE
  16560. + Support for local characters sets; uses the \fIsetlocal\fP\|() function.
  16561. + .IP MAILGROUP
  16562. + Makes \fIinc\fP set-group-id.
  16563. + You may need this option if your \fB/usr/spool/mail\fP
  16564. + is not world-writeable.
  16565. + .IP MIME
  16566. + Multi-media mail.
  16567. + .IP MPOP
  16568. + Mobile POP (see above).
  16569. + .IP MSGID
  16570. + Enables \fIslocal\fP to detect and surpress duplicate messages.
  16571. + .IP OSF1
  16572. + Support for DEC OSF1 systems.  May be incomplete.
  16573. + .IP RENAME
  16574. + Include this option if your system has a \fIrename\fP\|()
  16575. + system call.
  16576. + .IP SVR4
  16577. + Support for System 5 Release 4 or newer systems.
  16578. + .IP TYPESIG
  16579. + This option has been dropped.  See `signal' above.
  16580. + .IP UNISTD
  16581. + Include this option if your system has the include
  16582. + file \fB<unistd.h>\fP.
  16583. + .IP VSPRINTF
  16584. + Include this option if your system has the \fIvsprintf\fP\|()
  16585. + library routine; otherwise, \fI\(rudoprnt\fP\|() will be used.
  16586. + .IP YEARMOD
  16587. + Forces the \fImh-format\fP `year' function to
  16588. + return 2-digit values.
  16589. + Use this option during a brief transition period if 
  16590. + you have local \fImh-format\fP files which need to
  16591. + be converted to support 4-digit years.
  16592. + .SH 
  16593. + FUNCTIONAL CHANGES
  16594. + .LP
  16595. + In addition to the configuration changes mentioned above,
  16596. + a number of functional changes have been made to the system.
  16597. + Many programs have new features added and a few new 
  16598. + programs have are provided.  
  16599. + Each command's manual page gives
  16600. + complete information about the its operation.
  16601. + Here is a short summary of the changes.
  16602. + .SH
  16603. + MH Sequences
  16604. + .LP
  16605. + A larger number of user-defined sequences are available.
  16606. + Previously, this number had been 10.
  16607. + On 32-bit systems, 26 user-defined sequences are available.
  16608. + .SH
  16609. + Profile Components
  16610. + .LP
  16611. + \fIMH\fP programs will now complain if the 
  16612. + \fB\&.mh\(ruprofile\fR does not end in a newline.
  16613. + Also, one enhancement and one new profile component are provided:
  16614. + .IP Aliasfile: \w'AliasfileX'u+2n
  16615. + Multiple filenames may now be given.
  16616. + .IP Inbox:
  16617. + New; the default folder (for \fIinc\fP, etc.) if not \*(lqinbox\*(rq.
  16618. + .KS
  16619. + .SH
  16620. + Format Strings
  16621. + .LP
  16622. + A few minor bugs were fixed in format string handling,
  16623. + and a few new features were added.  See \fImh-format\fP\|(5)
  16624. + for complete details.
  16625. + .IP Addresses \w'Xxyearxdatexx'u+2n
  16626. + An attempt is made to decipher X\&.400 RFC\ 987-style addresses.
  16627. + .IP Comments
  16628. + Comments may be added to \fImh-format\fP files; a comment
  16629. + begins with the 2-character sequence \*(lq%;\*(rq,
  16630. + and ends with an un-escaped newline.
  16631. + .IP "%(modulo n)"
  16632. + The `modulo' function escape has been added.
  16633. + .IP %(year{date})
  16634. + The date parser has been enhanced to understand more
  16635. + illegal date formats; `year' now returns a 4-digit number.
  16636. + .KE
  16637. + .SH
  16638. + User Interface Programs
  16639. + .LP
  16640. + A number of \fIMH\fP commands have minor changes:
  16641. + .IP ali \w'packmbox'u+2n
  16642. + The output with `\-user\0\-list' was
  16643. + changed to match the output with `\-nouser\0\-list'.
  16644. + .IP burst
  16645. + Will no longer drop the last message of a digest.
  16646. + .IP inc
  16647. + Accepts the `\-apop' switch for authenticated POP (see above);
  16648. + will attempt to detect write
  16649. + errors (e.g., no space left on device) when incorporating mail;
  16650. + no longer replaces newline characters with NULLs.
  16651. + .IP folder
  16652. + The `\-noprint' option was broken and has been dropped.
  16653. + .IP forw
  16654. + Supports `\-mime' to use MIME-style multi-part messages.
  16655. + .IP mhl
  16656. + Will no longer put an extra space at the end of the
  16657. + `%{text}' in a formatfield.
  16658. + .IP mhn
  16659. + New; manipulates multi-media (MIME) messages; a detailed
  16660. + man page is provided.
  16661. + .IP mhparam
  16662. + New; reads the \fIMH\fP profile (and context) 
  16663. + and writes the values of the specified components on the
  16664. + standard output; useful in programmatic constructs.
  16665. + .IP msgchk
  16666. + Supports `\-apop' (see above).
  16667. + .IP packmbox
  16668. + New; packs an \fIMH\fP folder into a UUCP-style mailbox.
  16669. + .IP popi
  16670. + New; a client-side POP initiator; available only if you
  16671. + built \fIMH\fP with the MPOP option (see above).
  16672. + .IP refile
  16673. + A bug where the `rmmproc' did not remove all specified
  16674. + message files has been fixed.
  16675. + .IP scan
  16676. + The `\-file' option is fully supported and will no longer
  16677. + complain about empty folders.
  16678. + .IP send
  16679. + Supports `\-mime' and `\-split' to split large messages
  16680. + into multiple partial messages using MIME.
  16681. + .SH
  16682. + Support Programs
  16683. + .IP fmtdump \w'packmbox'u+2n
  16684. + Can now read a format file, or a format string given
  16685. + on the command line.
  16686. + .IP popauth
  16687. + New; manages the APOP authorization database (see above).
  16688. + .IP sendmail
  16689. + The \fIsendmail\fP replacement will be installed
  16690. + only if your `mts' setting uses the `/smtp' option.
  16691. + .IP slocal
  16692. + A new man page for \fIslocal\fP is available;
  16693. + the new `mbox' action is available to write a file
  16694. + in \fIpackf\fP format;
  16695. + a bug where extra `>' characters were written to MMDF-style
  16696. + maildrops has been fixed; 
  16697. + if compiled with the MSGID option, can detect and suppress
  16698. + reception of duplicate messages.
  16699. + .IP viamail
  16700. + New; bundles a directory (like \fIshar\fP\|) and
  16701. + sends it through multi-media mail.
  16702. + .ds LH Changes for MH 6.7.2
  16703. + .bp
  16704. + .ds CF Feb 1, 1992
  16705. + .SH
  16706. + CHANGES FOR MH 6.7.2
  16707. + .LP
  16708. + The MH.6.7.2 patch release is a maintenance
  16709. + release.
  16710. + This is the
  16711. + current released version of \fIMH\fP as of February 1, 1992.
  16712. + .PP
  16713. + This release now supports the NCR Tower running SYS5R4.
  16714. + The WP changes installed in MH.6.7.0 have been removed.
  16715. + .SH 
  16716. + Shared Libraries
  16717. + .LP
  16718. + Support for SYS 5 shared libraries is in progress.
  16719. + .PP
  16720. + Support for Sun OS 4.0 shared libraries had been improved.
  16721. + The \fIMH\fP library has been modified to move initialized
  16722. + data into a data definition file.  The shared library will
  16723. + now consist of a \fBlibmh.so\fP and \fBlibmh.sa\fP file.
  16724. + The shared library version number will no longer track the
  16725. + \fIMH\fP patch release number, and its numbering begins with
  16726. + version `1.1' with this release.
  16727. + .SH
  16728. + Replacement SendMail
  16729. + .LP
  16730. + Since many standard system programs expect to post mail by 
  16731. + invoking \fB/usr/lib/sendmail\fP,
  16732. + a minimal replacement \fISendMail\fP is provided in 
  16733. + this release.  This replacement is meant to be installed
  16734. + on (e.g., diskless) client workstations which post mail
  16735. + using SMTP, and do not run a message transport system.
  16736. + It will call \fIpost\fP to post mail; be sure you have
  16737. + configured \fIMH\fP with the `/smtp' mts option.
  16738. + This sendmail replacement is installed in your 
  16739. + \fIMH\fP etc directory, and you should link 
  16740. + \fB/usr/lib/sendmail\fP
  16741. + to it.
  16742. + .KS
  16743. + .SH
  16744. + Format Strings
  16745. + .LP
  16746. + A manual page for the \fIfmtdump\fP format string disassembler
  16747. + is supplied, and some new format functions were added:
  16748. + .IP folder \w'%getenv'u+2n
  16749. + In \fIscan\fP, this component escape
  16750. + contains the name of the current folder.
  16751. + It is not defined for other \fIMH\fP commands.
  16752. + .IP getenv
  16753. + This function escape returns the value of an environment variable.
  16754. + .KE
  16755. + .PP
  16756. + There will be some additional changes in these routines in the
  16757. + next patch release.
  16758. + .KS
  16759. + .SH
  16760. + Other Bug Fixes and Enhancements
  16761. + .LP
  16762. + In addition to some other minor enhancements,
  16763. + some bugs were fixed which in general were not user\-visible:
  16764. + .IP "Blind lists" \w'datexparsing'u+2n
  16765. + Users may now specify RFC822 address groups in their
  16766. + alias files.  These groups are implemented by \fIMH\fP 
  16767. + as blind lists.
  16768. + .IP "date parsing"
  16769. + A number of sites have brain-damaged versions of \fBlex\fP.
  16770. + \fIMH\fP will now come with the date parser already run
  16771. + through lex.
  16772. + .IP mark
  16773. + A bug dealing with \fImark\fP and the sequence named `cur'
  16774. + is fixed.  This was previously a problem for mh-e users.
  16775. + .IP MH.doc
  16776. + The \fIMH\fP nroff version of the manual no longer contains
  16777. + teletype escape sequences.
  16778. + .IP scan
  16779. + Can now handle headers as long as 512 bytes.
  16780. + .IP Signals
  16781. + \fIMH\fP programs will no longer catch the \fBHUP\fP
  16782. + and \fBTERM\fP signals while waiting for a sub-process.
  16783. + This was causing hung processes when your terminal line was
  16784. + was dropped unexpectedly.
  16785. + .IP Signature
  16786. + If your signature is not defined, \fIMH\fP will 
  16787. + use the value of the gecos field of your \fB/etc/passwd\fP
  16788. + entry as your signature.
  16789. + .IP "version.sh"
  16790. + A bug in the \fBawk\fP script in \fBconfig/version.sh\fP 
  16791. + was fixed.
  16792. + .KE
  16793. + .ds LH Changes for MH 6.7.1a
  16794. + .bp
  16795. + .ds CF January 25, 1991
  16796. + .SH 
  16797. + CHANGES FOR MH 6.7.1a
  16798. + .LP
  16799. + The MH.6.7.1a patch was made available 
  16800. + on January 25, 1991 for limited distribution only.
  16801. + (This release had some known bugs, and so was
  16802. + not widely distributed.)
  16803. + This release incorporates several new features
  16804. + of particular note to users of sequences and format strings,
  16805. + as well as some general documentation improvements.
  16806. + There are a few minor enhancements and internal bug fixes also.
  16807. + Complete documentation of these changes is given in
  16808. + the individual manual pages, and the \fBREAD-ME\fP file.
  16809. + .SH
  16810. + Message Sequences
  16811. + .LP
  16812. + A new manual page, \fImh\-sequence\0\fP(5), has been added.
  16813. + This manual page attempts to completely document the
  16814. + syntax and semantics of \fIMH\fP message sequence specifications.
  16815. + .PP
  16816. + A powerful new feature is the ability to specify message
  16817. + ranges with user-defined sequences.  The  specification
  16818. + \*(lqname:n\*(rq may be used, and it designates up to the
  16819. + first `n' messages (or  last  `n' messages  for  `-n')
  16820. + which  are  elements  of the user-defined sequence `name'.
  16821. + .PP
  16822. + The message
  16823. + specifications \*(lqname:next\*(rq and \*(lqname:prev\*(rq
  16824. + may also be used, and they
  16825. + designate the
  16826. + next or previous message (relative to the current message)
  16827. + which is an element of the user-defined sequence `name'.
  16828. + The specifications
  16829. + \*(lqname:first\*(rq and \*(lqname:last\*(rq are equivalent
  16830. + to \*(lqname:1\*(rq and \*(lqname:\-1\*(rq, respectively.
  16831. + The specification \*(lqname:cur\*(rq is not allowed
  16832. + (use just \*(lqcur\*(rq instead).
  16833. + .PP
  16834. + These specifications allow the user to step through
  16835. + a sequence with a command like \*(lqshow name:next\*(rq.
  16836. + .SH
  16837. + Format Strings
  16838. + .LP
  16839. + \fIMH\fP format strings now support an if-then-elseif-else
  16840. + clause (the `elseif' is new).  This will make
  16841. + format strings with multi-case conditions somewhat less complex.
  16842. + .PP
  16843. + A new format function `addr' had been added.  This function
  16844. + takes an address header name as its argument, and returns
  16845. + a rendering of the address contained in that header
  16846. + as \*(lquser@host\*(rq or \*(lqhost!user\*(rq.
  16847. + .PP
  16848. + Format widths now may be specified as a negative number.
  16849. + This causes the output to be right-justified
  16850. + within the format width.
  16851. + .KS
  16852. + .SH
  16853. + Other Changes
  16854. + .LP
  16855. + Along with a few minor enhancements,
  16856. + some bugs were fixed which in general were not user-visible:
  16857. + .IP "fmtdump" \w'whatnow'u+2n
  16858. + This new program 
  16859. + produces an pseudo-language
  16860. + representation of an \fIMH\fP format file, vaguely
  16861. + reminiscent of assembly language.  While this output format
  16862. + is not explicitly documented,
  16863. + it can still be useful when debugging \fIMH\fP format files.
  16864. + .IP "refile"
  16865. + Now takes a `\-\[no\]rmmproc' switch.  This makes it
  16866. + easier to avoid loops when your \*(lqrmmproc\*(rq calls \fIrefile\fP.
  16867. + .IP "slocal"
  16868. + A problem with the UUCP-style mailboxes,
  16869. + the `RPATHS' configuration option,
  16870. + and the \*(lqReturn-Path:\*(rq header was fixed.
  16871. + .IP "sortm"
  16872. + Will ensure that no messages are lost if it is interrupted.
  16873. + .IP "whatnow"
  16874. + Will now tell you where it is leaving the draft, when
  16875. + interrupted in the initial edit.  Previously the draft 
  16876. + was simply unlinked.
  16877. + .KE
  16878. + .KS
  16879. + .SH
  16880. + Compilation Options
  16881. + .IP "LOCKF" \w'whatnow'u+2n
  16882. + This option causes \fIMH\fP to use the \fBlockf()\fP
  16883. + system call for locking (if available),
  16884. + instead of \fBflock()\fP.
  16885. + .KE
  16886. + .ds LH Changes for MH 6.7.1
  16887. + .bp
  16888. + .ds CF December 14, 1990
  16889. + .SH 
  16890. + CHANGES FOR MH 6.7.1
  16891. + .LP
  16892. + The MH.6.7.1 patch release is a maintenance
  16893. + release, and as such, provides few changes from 
  16894. + the previous release.  This is the
  16895. + current released version of \fIMH\fP as of December 14, 1990.
  16896. + .SH
  16897. + User-Visible Changes
  16898. + .LP
  16899. + The major change in this release is to the
  16900. + POP daemon (popd).  In \fIMH\fP 6.7,
  16901. + it was changed to be able to read both UUCP and
  16902. + MMDF-style mailboxes.  This did not work as reported.  The
  16903. + code has now been changed to parse MMDF-style mailboxes if
  16904. + you are configuring MH to run with MMDF as your message
  16905. + transport system.  Otherwise, UUCP-style mailboxes are
  16906. + expected.
  16907. + .PP
  16908. + Since there are number of client programs available for
  16909. + only the POP2 protocol instead of POP3, popd has been
  16910. + updated to support both protocols.  This is a major
  16911. + win.  If you are compiling
  16912. + with POP turned on, add the `POP2' option to
  16913. + your \fIMH\fP config file, and the POP daemon
  16914. + will respond to POP2 or POP3 commands.  If you're using
  16915. + POP, there's no reason not to include this option; it does
  16916. + not affect the existing support for POP3.
  16917. + .KS
  16918. + .SH
  16919. + Internal Changes
  16920. + .LP
  16921. + Some bugs were fixed which in general were not user-visible:
  16922. + .IP "context" \w'replnnetcn'u+2n
  16923. + Errors when writing out sequences are detected correctly.
  16924. + .IP "inc"
  16925. + No longer inserts extra blank lines into messages.
  16926. + .IP "mh-format"
  16927. + A nil pointer bug in the address parser was fixed.
  16928. + .IP "repl, etc."
  16929. + The malloc/free problem has been fixed.
  16930. + .IP "rmf"
  16931. + A spelling error in the `\-nointeractive' switch has been corrected.
  16932. + .IP "rcvtty"
  16933. + Will not print the message size if not available (i.e., zero).
  16934. + .IP "send/post"
  16935. + Illegal signatures (those containing unquoted "."s) will be quoted.
  16936. + .KE
  16937. + .ds LH Changes for MH 6.7.0
  16938. + .bp
  16939. + .ds CF April 12, 1990
  16940. + .SH
  16941. + GENERAL CHANGES FOR MH 6.7.0
  16942. + .LP
  16943. + The author is pleased to announce that there are very few
  16944. + user\-visible
  16945. + changes to \fIMH\fP 6.7 from the previous \fIMH\fP 6.6 distribution.
  16946. + The majority of development was in the form of bug fixes and
  16947. + slight enhancements.
  16948. + In addition, this release is slightly faster than the
  16949. + previous release.
  16950. + With a few minor exceptions,
  16951. + it is backward\-compatible with the previous release.
  16952. + \fIMH\fP 6.7.0 is the current released version of \fIMH\fP
  16953. + as of April 12, 1990.
  16954. + .PP
  16955. + The changes were made mainly to generalize the source code to
  16956. + be compatible with a larger range of systems and compilers.
  16957. + There were many small changes to add declarations for ANSI C compliance.
  16958. + The System 5 support has been brought up to SYS5 R3, and there is
  16959. + support for Sun OS 4.0.
  16960. + .SH
  16961. + User\-Visible Changes
  16962. + .LP
  16963. + Here a quick summary of the
  16964. + changes that were made which are not backward\-compatible with the
  16965. + previous release of \fIMH\fP:
  16966. + .IP repl \w'sortm'u+2n
  16967. + The `\-format' and `\-noformat' switches
  16968. + have not been functional since \fIMH\fP 5, and have been removed.
  16969. + Any users who have these switches in their \fB\&.mh\(ruprofile\fP,
  16970. + will have to remove them.
  16971. + .IP sortm
  16972. + Previously, in most cases \fIsortm\fP would fill\-in any
  16973. + gaps in the numbering of a folder, 
  16974. + by renumbering the messages starting with `1'.
  16975. + This will no longer occur; for this behavior,
  16976. + use \*(lqfolder \-pack\*(rq.
  16977. + .PP
  16978. + .SH
  16979. + Using Aliases
  16980. + .LP
  16981. + A new profile entry `Aliasfile:' has been added.  The
  16982. + \fIali\fP\^, \fIsend\fP\^, and \fIwhom\fP programs will look for
  16983. + this profile entry and treat it as they would an argument to
  16984. + `\-alias'.
  16985. + This should make it easier for novice \fIMH\fP users to begin
  16986. + using aliases.
  16987. + .PP
  16988. + .SH
  16989. + Reading Network News & BBoards
  16990. + .LP
  16991. + The UCI BBoards facility can read local BBoards, and if compiled
  16992. + with the `bboards: pop' and `pop: on' options, can also read remote
  16993. + BBoards using the Post Office Protocol (POP ver. 3).
  16994. + With this release,
  16995. + \fIMH\fP can instead be compiled to read the Network News
  16996. + (i.e., USENET) using the Network News Transfer Protocol (NNTP).
  16997. + .PP
  16998. + This capability is enabled by compiling \fIMH\fP with
  16999. + the `bboards: nntp' and `pop: on' options.
  17000. + Unfortunately, reading remote BBoards via the POP and reading the Network
  17001. + News via the NNTP are mutually exclusive options.
  17002. + .PP
  17003. + To support the NNTP,
  17004. + a new module, \fBuip/pshsbr.c\fP, is compiled and loaded into
  17005. + \fIbbc\fP and \fImsh\fP instead of \fBuip/popsbr.c\fP.
  17006. + The default BBoard is changed from \*(lqsystem\*(rq to \*(lqgeneral\*(rq
  17007. + for the NNTP.
  17008. + .PP
  17009. + When reading BBoards,
  17010. + \fIbbc\fP will first look for local BBoards, and then contact the
  17011. + NNTP server to read the Network News.  The location of the
  17012. + NNTP server should be specified with the `nntphost:'
  17013. + entry in the \fBmtstailor\fP file
  17014. + (see the \fIMH\fP Administrator's Guide for details),
  17015. + or may be specified on
  17016. + the command line with the `\-host' switch.
  17017. + .PP
  17018. + .SH
  17019. + Format Strings
  17020. + .LP
  17021. + The manual page \fImh\-format\fP\0(5) has
  17022. + been rewritten to give a better explanation of how to write format strings,
  17023. + and how they are interpreted by \fIMH\fP.
  17024. + A line\-by\-line
  17025. + description of the 
  17026. + default \fIrepl\fP form file (\fBreplcomps\fP)
  17027. + is now included in that manual page.
  17028. + .PP
  17029. + .KS
  17030. + Some new format functions were added, and others were augmented:
  17031. + .IP trim \w'date2local'u+2n
  17032. + Strips any leading and trailing white\-space from the current string value.
  17033. + .IP date2local
  17034. + Will coerce the date to the local timezone.
  17035. + .IP date2gmt
  17036. + Will coerce the date to GMT.
  17037. + .IP divide
  17038. + Divides the current numeric value by its argument.
  17039. + This could be useful for
  17040. + building \fIscan\fP format strings which print large
  17041. + message sizes in \*(lqKb\*(rq or \*(lqMb\*(rq.
  17042. + .IP friendly
  17043. + If the address field cannot be parsed,
  17044. + this function will return the text of the address header,
  17045. + instead of a null string.
  17046. + .IP szone
  17047. + A flag indicating whether the timezone was explicit
  17048. + in the date string.
  17049. + .KE
  17050. + .SH
  17051. + PROGRAM CHANGES
  17052. + .LP
  17053. + In addition to the general changes mentioned above,
  17054. + many programs have specific new features added,
  17055. + either by new switches or by expanded functionality.
  17056. + Each command's manual page gives complete information about
  17057. + its new options.  Here is a short summary.
  17058. + .SH
  17059. + User Interface Programs
  17060. + .IP anno \w'prompter'u+2n
  17061. + Accepts a `\-nodate' switch which inhibits the date annotation,
  17062. + leaving only the body annotation.
  17063. + .IP folder
  17064. + When invoked with the `\-pack' switch
  17065. + and the new `\-verbose' switch, \fIfolder\fP will
  17066. + give information about the actions taken to renumber the folder.
  17067. + .IP
  17068. + On most systems, \fIfolder\fP can now create any non\-existing
  17069. + parent folders of a new sub\-folder.
  17070. + .IP forw
  17071. + When making digests, \fIforw\fP\^
  17072. + will put the issue and volume numbers
  17073. + in addition to the digest list name, in the digest trailer.
  17074. + .IP inc
  17075. + Detects NFS write failures, and will
  17076. + not zero your maildrop in that event.
  17077. + .IP msh
  17078. + Supports a variant of the new \fIsortm\fP\^.
  17079. + .IP prompter
  17080. + Considers a period on a line by itself to signify end\-of\-file
  17081. + when the `\-doteof' switch is specified.
  17082. + .IP repl
  17083. + The `\-[no]format' switches
  17084. + have not been used since \fIMH\fP 5 and have been deleted. \fIrepl\fP
  17085. + will now find filter files in the \fIMH\fP library area.
  17086. + .IP scan
  17087. + With the `\-file msgbox' switch, \fIscan\fP\^
  17088. + can list a \fIpackf\fP\|'d\-format file directly
  17089. + (without using \fImsh\fP\^).
  17090. + .IP
  17091. + Lists messages in reverse order with the `\-reverse' switch.
  17092. + This should be considered a bug.
  17093. + .IP sortm
  17094. + Now has the options:
  17095. + `\-textfield field', `\-notextfield',
  17096. + `\-limit days', and `\-nolimit'.
  17097. + .IP
  17098. + With these options, \fIsortm\fP can be instructed to sort a
  17099. + folder based on the contents of an arbitrary header such
  17100. + as \*(lqsubject\*(rq.
  17101. + .IP
  17102. + \fIsortm\fP minimizes renaming messages, and
  17103. + will no longer arbitrarily pack folders; for this behavior,
  17104. + use \*(lqfolder \-pack\*(rq.
  17105. + .IP whatnow
  17106. + Deletes the draft by renaming it with leading comma, instead
  17107. + of unlinking it.
  17108. + .SH
  17109. + \fIMH\fP Support Programs
  17110. + .LP
  17111. + .KS
  17112. + The following support programs also have changes or enhancements:
  17113. + .IP mhl \w'rcvtty'u+2n
  17114. + Will now accept a format string on any component, not just on
  17115. + addresses and dates.
  17116. + .KE
  17117. + .IP popd
  17118. + Will use \fIshadow\fP passwords if compiled with the
  17119. + \fBSHADOW\fP option.  It can now also
  17120. + read UUCP\-style maildrops directly.
  17121. + .IP rcvtty
  17122. + If given no arguments, \fIrcvtty\fP will produce a \fBscan\fP
  17123. + listing as specified by a format string or file; a default
  17124. + format string is used if one is not specified.
  17125. + .IP
  17126. + Before the listing is written to the users terminal, the
  17127. + terminal's bell is rung and a newline is output.
  17128. + The `\-nobell' and the `\-nonewline' options
  17129. + inhibit these functions.
  17130. + .IP
  17131. + \fIrcvtty\fP will obey terminal write
  17132. + notification set by \fImesg\fP.
  17133. + With the `\-biff' switch, \fIrcvtty\fP will
  17134. + also obey the mail notification status set by
  17135. + \fIbiff\fP.  
  17136. + .IP
  17137. + On \fBBSD43\fP systems, as with \fIwrite\fP,
  17138. + \fIrcvtty\fP will be installed set\-group\-id to the group \*(lqtty\*(rq.
  17139. + .IP slocal
  17140. + Understands UUCP\-style \*(lqFrom \*(rq lines and will write
  17141. + output files using this format if appropriate.
  17142. + Before invoking a delivery program, \fIslocal\fP will strip
  17143. + such lines unless compiled with the \fBRPATHS\fP option,
  17144. + in which case it will will convert such lines into
  17145. + \*(lqReturn\-Path:\*(rq headers.
  17146. + .IP
  17147. + \fIslocal\fP has a new result code \*(lqN\*(rq,
  17148. + for use in \fB.maildelivery\fP files.
  17149. + With this result code,
  17150. + \fIslocal\fP will
  17151. + perform the action only if the message has not been delivered
  17152. + and the previous action succeeded.  This allows for performing
  17153. + an action only if multiple conditions are true.
  17154. + .SH
  17155. + DOCUMENTATION
  17156. + .LP
  17157. + Several of the older \fIMH\fP papers have been difficult to format
  17158. + because they depended on an older version of
  17159. + PhDTeX which was
  17160. + not supplied.  These papers have been updated, and some TeX
  17161. + library files are supplied in \fBpapers/doclib/\fP, so that
  17162. + these papers may be generated on any system with TeX.
  17163. + .PP
  17164. + Many of the manual pages have been revised to include documentation
  17165. + of new command options, and some have been expanded to give more detail.
  17166. + All are now slightly reformatted at installation time
  17167. + to make them more compatible with programs like \fImakewhatis\fP\^.
  17168. + .PP
  17169. + .SH
  17170. + \fIMH\fP ADMINISTRATION
  17171. + .LP
  17172. + This section describes changes in configuring, compiling and
  17173. + installing \fIMH\fP 6.7 and should not
  17174. + be of interest to casual \fIMH\fP users.
  17175. + The \fBREAD\-ME\fP file has been 
  17176. + considerably revised and expanded to give more detail 
  17177. + about the configuration and compilation options which
  17178. + have been included in this release.  Some compilation options
  17179. + have been removed, and many new options have been added.
  17180. + .PP
  17181. + All \fIMH\fP \fBMakefile\fPs have been updated to work around some
  17182. + incompatibilities introduced in newer versions of \fImake\fP\^.
  17183. + \fIMH\fP programs will no longer be installed with the sticky\-bit
  17184. + turned on.
  17185. + .PP
  17186. + Reading this section not a substitute for carefully
  17187. + reading the \fBREAD\-ME\fP file before attempting to compile \fIMH\fP
  17188. + .PP
  17189. + .KS
  17190. + .SH
  17191. + Bug Fixes
  17192. + .LP
  17193. + Some bugs were fixed which in general were not user\-visible:
  17194. + .IP "address parser" \w'dynamicnmemory'u+2n
  17195. + Fixed to allow use of the \*(lqAT\*(rq domain, and some
  17196. + minor bugs were fixed pertaining to address groups.
  17197. + .IP "date parser"
  17198. + Improved to accept more forms of illegal dates.  Military
  17199. + timezones were removed.
  17200. + .IP "dynamic memory"
  17201. + Many problems with corruption of the dynamic memory pool
  17202. + have been fixed.
  17203. + .IP locking
  17204. + Will open files for write, if necessary to enable locking.
  17205. + .IP "nil pointers"
  17206. + All reported nil pointer problems have been fixed.
  17207. + .IP replcomps
  17208. + The \*(lqIn\-Reply\-To:\*(rq header had quotes added
  17209. + around the date field to comply with RFC822.
  17210. + .KE
  17211. + .SH
  17212. + White Pages
  17213. + .LP
  17214. + If \fIMH\fP is compiled with the \fBWP\fP option,
  17215. + \fIsend\fP recognizes an address between \*(lq<<\*(rq and \*(lq>>\*(rq characters
  17216. + such as:
  17217. + .DS
  17218. + To: << rose \-org psi >>
  17219. + .DE
  17220. + to be a name meaningful to a whitepages service.  In order to expand the
  17221. + name, \fIsend\fP must be invoked interactively
  17222. + (i.e., not from \fIpush\fP\^).  For each
  17223. + name, \fIsend\fP will invoke a command called \fIfred\fP\^
  17224. + in a special mode asking to expand the name.
  17225. + .PP
  17226. + To get a copy of the white pages service, contact wpp\-manager@psi.com.
  17227. + .SH
  17228. + Configuration Options
  17229. + .LP
  17230. + Some configuration options have been added or changed:
  17231. + .IP cc \w'bbdelivery'u+2n
  17232. + To specify an alternate C compiler.
  17233. + .IP ccoptions
  17234. + Defaults to `\-O'.
  17235. + .IP bboards
  17236. + May now be defined as \*(lqon\*(rq,
  17237. + \*(lqoff\*(rq, \*(lqpop\*(rq, or \*(lqnntp\*(rq.
  17238. + .IP bbdelivery
  17239. + Determines whether the bboard delivery agent
  17240. + and library files should be installed.
  17241. + .IP lex
  17242. + To specify an alternate version of \fIlex\fP\^.
  17243. + .IP mailgroup
  17244. + If defined, \fIinc\fP will be made set\-group\-id to this group.
  17245. + .IP sharedlib
  17246. + For \fBSUN40\fP systems; if \*(lqon\*(rq, makes \fBlibmh.a\fP
  17247. + into a shared library.
  17248. + .IP slibdir
  17249. + The directory where the above shared library should be installed.
  17250. + .IP sprintf
  17251. + Set this to \*(lqint\*(rq if that's what your \fIsprintf\fP\0(3) library
  17252. + routine returns.
  17253. + .SH
  17254. + Compilation Options
  17255. + .LP
  17256. + For different configurations,
  17257. + several `\-D' options to \fIcc\fP have been added or changed:
  17258. + .IP BERK \w'SENDMAILBUG'u+1n
  17259. + This disables the address and date parsing routines.  If you
  17260. + want to do much with \fImh\-format\fP\0(5), don't enable this.
  17261. + .IP BSD43
  17262. + Will make \fIrcvtty\fP set\-group\-id to the group \*(lqtty\*(rq.
  17263. + .IP DBM
  17264. + For sites with a dbm\-style password file (such as with Yellow
  17265. + Pages), \fIMH\fP will not read the entire passwd file into a cache.
  17266. + At one site that runs YP on a large passwd file, using this
  17267. + showed a 6:1 performance improvement.
  17268. + .IP NETWORK
  17269. + This option has been deleted.  See \fBSOCKETS\fP.
  17270. + .IP NOIOCTLH
  17271. + Tells \fIMH\fP not to include the file \fBsys/ioctl.h\fP.  Use this
  17272. + if this file is not present on your system.
  17273. + .IP NTOHLSWAP
  17274. + On systems with TCP/IP networking,
  17275. + \fImsh\fP will try to use the \fBntohl()\fP macro from the
  17276. + file \fBnetinet/in.h\fP to byte\-swap the binary map files
  17277. + it writes.
  17278. + .IP SENDMAILBUG
  17279. + Some versions of \fIsendmail\fP return a \fB451\fP (failure) reply code
  17280. + when they don't mean to indicate failure.  This option considers
  17281. + that code to be equivalent to \fB250\fP (OK).
  17282. + .IP SHADOW
  17283. + Causes \fIpopd\fP to read the file \fB/etc/shadow\fP for
  17284. + encrypted passwords instead of \fB/etc/passwd\fP.  Use this if you
  17285. + have a shadow password file (such as on newer versions of SYSTEM 5).
  17286. + .IP SOCKETS
  17287. + Enable this if you are on a non\-BSD system with a
  17288. + socket interface for TCP/IP networking compatible with 4.2BSD
  17289. + .SM
  17290. + UNIX.
  17291. + .NL
  17292. + .IP SUN40
  17293. + Use on Suns running Sun OS 4.0 and later.
  17294. + .IP SYS5
  17295. + This option has been updated to refer to SYS5 R3 and later systems.
  17296. + .IP SYS5DIR
  17297. + Use this if your system uses \*(lqstruct dirent\*(rq instead of
  17298. + \*(lqstruct direct\*(rq.  This should be true for systems based
  17299. + on SYS5 R3 and later.
  17300. + .IP TYPESIG
  17301. + Defines the base type for the \fIsignal\fP system call.  This
  17302. + defaults to \*(lqint\*(rq, but should be defined as \*(lqvoid\*(rq
  17303. + if appropriate for your system.
  17304. + .IP WP
  17305. + Enables support for the White Pages service.
  17306. + .SH
  17307. + Installation
  17308. + .LP
  17309. + \fIMH\fP will now
  17310. + explicitly set the protection mode on every file it installs.
  17311. + .PP
  17312. + Previously any existing file installed by \fIMH\fP
  17313. + would be backed up into
  17314. + the source tree, and then overwritten.
  17315. + Now, a few system\-dependent files will not be overwritten, and your
  17316. + changes will have to be merged in by hand.
  17317. + See the \fBREAD\-ME\fP file for more details.
  17318. *** ../mh-6.7.2/papers/doclib/READ-ME    Tue Mar  6 14:50:39 1990
  17319. --- papers/doclib/READ-ME    Thu Feb 13 10:26:09 1992
  17320. ***************
  17321. *** 1,2 ****
  17322. ! [ doclib/READ-ME - 31Jan90/JLR ]
  17323.   
  17324. --- 1,2 ----
  17325. ! @(#)$Id: READ-ME,v 1.2 1992/02/13 18:26:08 jromine Exp $
  17326.   
  17327. ***************
  17328. *** 22,25 ****
  17329.   For this reason, this directory contains all files necessary to typeset
  17330. ! these documents using plain TeX (as of Version 2.991).  The Makefiles
  17331. ! call TeX as "tex82".
  17332.   
  17333. --- 22,24 ----
  17334.   For this reason, this directory contains all files necessary to typeset
  17335. ! these documents using plain TeX (as of Version 2.991).
  17336.   
  17337. *** ../mh-6.7.2/papers/doclib/diss.sty    Thu Apr  5 16:05:45 1990
  17338. --- papers/doclib/diss.sty    Thu Feb 13 10:27:38 1992
  17339. ***************
  17340. *** 1,3 ****
  17341.   % UCI Dissertation Style for AmSTeX.
  17342. ! % @(#)$Id: diss.sty,v 1.3 90/04/05 15:20:23 sources Exp $
  17343.   
  17344. --- 1,3 ----
  17345.   % UCI Dissertation Style for AmSTeX.
  17346. ! % @(#)$Id: diss.sty,v 1.3 1990/04/05 15:20:23 sources Exp $
  17347.   
  17348. *** ../mh-6.7.2/papers/mh4/Makefile    Tue Mar  6 14:49:44 1990
  17349. --- papers/mh4/Makefile    Thu Feb 13 10:23:51 1992
  17350. ***************
  17351. *** 10,12 ****
  17352.   
  17353. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17354.               \\nonstopmode\\input $<\\bye; \
  17355. --- 10,12 ----
  17356.   
  17357. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17358.               \\nonstopmode\\input $<\\bye; \
  17359. *** ../mh-6.7.2/papers/mh5/Makefile    Tue Mar  6 14:49:45 1990
  17360. --- papers/mh5/Makefile    Thu Feb 13 10:23:54 1992
  17361. ***************
  17362. *** 10,12 ****
  17363.   
  17364. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17365.               \\nonstopmode\\input $<\\bye; \
  17366. --- 10,12 ----
  17367.   
  17368. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17369.               \\nonstopmode\\input $<\\bye; \
  17370. *** ../mh-6.7.2/papers/multifarious/Makefile    Tue Mar  6 14:49:46 1990
  17371. --- papers/multifarious/Makefile    Thu Feb 13 10:23:57 1992
  17372. ***************
  17373. *** 10,12 ****
  17374.   
  17375. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17376.               \\nonstopmode\\input $<\\bye; \
  17377. --- 10,12 ----
  17378.   
  17379. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17380.               \\nonstopmode\\input $<\\bye; \
  17381. *** ../mh-6.7.2/papers/realwork/Makefile    Tue Mar  6 14:49:46 1990
  17382. --- papers/realwork/Makefile    Thu Feb 13 10:24:01 1992
  17383. ***************
  17384. *** 10,12 ****
  17385.   
  17386. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17387.               \\nonstopmode\\input $<\\bye; \
  17388. --- 10,12 ----
  17389.   
  17390. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17391.               \\nonstopmode\\input $<\\bye; \
  17392. *** ../mh-6.7.2/papers/trusted/Makefile    Tue Mar  6 14:49:47 1990
  17393. --- papers/trusted/Makefile    Thu Feb 13 10:24:03 1992
  17394. ***************
  17395. *** 10,12 ****
  17396.   
  17397. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17398.               \\nonstopmode\\input $<\\bye; \
  17399. --- 10,12 ----
  17400.   
  17401. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17402.               \\nonstopmode\\input $<\\bye; \
  17403. *** ../mh-6.7.2/papers/tutorial/Makefile    Tue Mar  6 14:49:47 1990
  17404. --- papers/tutorial/Makefile    Thu Feb 13 10:24:06 1992
  17405. ***************
  17406. *** 10,12 ****
  17407.   
  17408. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
  17409.               \\nonstopmode\\input $<\\bye; \
  17410. --- 10,12 ----
  17411.   
  17412. ! .tex.dvi:;    sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
  17413.               \\nonstopmode\\input $<\\bye; \
  17414. *** ../mh-6.7.2/sbr/addrsbr.c    Thu Jan 30 14:39:50 1992
  17415. --- sbr/addrsbr.c    Mon Oct 26 14:44:34 1992
  17416. ***************
  17417. *** 1,7 ****
  17418.   /* addrsbr.c - parse addresses 822-style */
  17419.   #ifndef    lint
  17420. ! static char ident[] = "@(#)$Id: addrsbr.c,v 1.10 1992/01/30 22:39:48 jromine Exp $";
  17421. ! #endif    lint
  17422.   
  17423.   #include "../h/mh.h"
  17424.   #include "../h/addrsbr.h"
  17425. --- 1,7 ----
  17426.   /* addrsbr.c - parse addresses 822-style */
  17427.   #ifndef    lint
  17428. ! static char ident[] = "@(#)$Id: addrsbr.c,v 1.13 1992/10/26 22:44:26 jromine Exp $";
  17429. ! #endif /* lint */
  17430.   
  17431.   #include "../h/mh.h"
  17432.   #include "../h/addrsbr.h"
  17433. ***************
  17434. *** 9,15 ****
  17435.   #include <stdio.h>
  17436.   #ifdef    BERK
  17437.   #include <ctype.h>
  17438. ! #endif    BERK
  17439.   
  17440.   /* High level parsing of addresses:
  17441.   
  17442. --- 9,15 ----
  17443.   #include <stdio.h>
  17444.   #ifdef    BERK
  17445.   #include <ctype.h>
  17446. ! #endif /* BERK */
  17447.   
  17448.   /* High level parsing of addresses:
  17449.   
  17450. ***************
  17451. *** 84,95 ****
  17452.   #if    !defined(DUMB) && defined(SENDMTS) && !defined(BANG)
  17453.   #define    MF
  17454.   #define    UucpChan()    "UUCP"
  17455. ! #endif    MF
  17456.   
  17457.   #ifdef    BERK
  17458.   static char *err = NULL;
  17459.   static char adrtext[BUFSIZ];
  17460. ! #else    not BERK
  17461.   static int  ingrp = 0;
  17462.   
  17463.   static char *pers = NULL;
  17464. --- 84,95 ----
  17465.   #if    !defined(DUMB) && defined(SENDMTS) && !defined(BANG)
  17466.   #define    MF
  17467.   #define    UucpChan()    "UUCP"
  17468. ! #endif /* MF */
  17469.   
  17470.   #ifdef    BERK
  17471.   static char *err = NULL;
  17472.   static char adrtext[BUFSIZ];
  17473. ! #else /* not BERK */
  17474.   static int  ingrp = 0;
  17475.   
  17476.   static char *pers = NULL;
  17477. ***************
  17478. *** 100,106 ****
  17479.   static char *note = NULL;
  17480.   
  17481.   static char err[BUFSIZ];
  17482. ! #endif    not BERK
  17483.   static char adr[BUFSIZ];
  17484.   
  17485.   
  17486. --- 100,106 ----
  17487.   static char *note = NULL;
  17488.   
  17489.   static char err[BUFSIZ];
  17490. ! #endif /* not BERK */
  17491.   static char adr[BUFSIZ];
  17492.   
  17493.   
  17494. ***************
  17495. *** 182,188 ****
  17496.       while (state != EOA) {
  17497.       *adrcopy++ = c;
  17498.       if (state != COM)
  17499. !         *nxtout++ = isupper (c) ? tolower (c) : c;
  17500.       switch (state+c) {
  17501.   
  17502.       case NORMAL+'\n':    /* discard newlines */
  17503. --- 182,188 ----
  17504.       while (state != EOA) {
  17505.       *adrcopy++ = c;
  17506.       if (state != COM)
  17507. !         *nxtout++ = (isalpha(c) && isupper (c)) ? tolower (c) : c;
  17508.       switch (state+c) {
  17509.   
  17510.       case NORMAL+'\n':    /* discard newlines */
  17511. ***************
  17512. *** 244,250 ****
  17513.           err = "illegal \\";
  17514.           }
  17515.           *adrcopy++ = c;
  17516. !         *nxtout++ = isupper (c) ? tolower (c) : c;
  17517.           break;
  17518.   
  17519.       case NORMAL+',':
  17520. --- 244,250 ----
  17521.           err = "illegal \\";
  17522.           }
  17523.           *adrcopy++ = c;
  17524. !         *nxtout++ = (isalpha(c) && isupper (c)) ? tolower (c) : c;
  17525.           break;
  17526.   
  17527.       case NORMAL+',':
  17528. ***************
  17529. *** 286,296 ****
  17530.       adr_ptr = NULL;
  17531.       return NULL;
  17532.       }
  17533. ! #else    not BERK
  17534.       register struct adrx *ap;
  17535.   
  17536.       pers = mbox = host = route = grp = note = NULL;
  17537. !     err[0] = NULL;
  17538.   
  17539.       if ((ap = getadrx (addrs ? addrs : "")) == NULL)
  17540.       return NULL;
  17541. --- 286,296 ----
  17542.       adr_ptr = NULL;
  17543.       return NULL;
  17544.       }
  17545. ! #else /* not BERK */
  17546.       register struct adrx *ap;
  17547.   
  17548.       pers = mbox = host = route = grp = note = NULL;
  17549. !     err[0] = '\0';
  17550.   
  17551.       if ((ap = getadrx (addrs ? addrs : "")) == NULL)
  17552.       return NULL;
  17553. ***************
  17554. *** 307,313 ****
  17555.       (void) strcpy (err, ap -> err);
  17556.   
  17557.       return adr;
  17558. ! #endif    not BERK
  17559.   }
  17560.   
  17561.   /*   */
  17562. --- 307,313 ----
  17563.       (void) strcpy (err, ap -> err);
  17564.   
  17565.       return adr;
  17566. ! #endif /* not BERK */
  17567.   }
  17568.   
  17569.   /*   */
  17570. ***************
  17571. *** 314,320 ****
  17572.   
  17573.   #ifdef    BERK
  17574.   /* ARGSUSED */
  17575. ! #endif    BERK
  17576.   
  17577.   struct mailname *getm (str, dfhost, dftype, wanthost, eresult)
  17578.   register char   *str,
  17579. --- 314,320 ----
  17580.   
  17581.   #ifdef    BERK
  17582.   /* ARGSUSED */
  17583. ! #endif /* BERK */
  17584.   
  17585.   struct mailname *getm (str, dfhost, dftype, wanthost, eresult)
  17586.   register char   *str,
  17587. ***************
  17588. *** 327,337 ****
  17589.       register char   *pp;
  17590.   #ifndef    DUMB
  17591.       register char   *dp;
  17592. ! #endif    not DUMB
  17593.   #ifdef    MF
  17594.       char   *up = UucpChan ();
  17595. ! #endif    MF
  17596. ! #endif    not BERK
  17597.       register struct mailname *mp;
  17598.   
  17599.       if (err && err[0]) {
  17600. --- 327,337 ----
  17601.       register char   *pp;
  17602.   #ifndef    DUMB
  17603.       register char   *dp;
  17604. ! #endif /* not DUMB */
  17605.   #ifdef    MF
  17606.       char   *up = UucpChan ();
  17607. ! #endif /* MF */
  17608. ! #endif /* not BERK */
  17609.       register struct mailname *mp;
  17610.   
  17611.       if (err && err[0]) {
  17612. ***************
  17613. *** 344,354 ****
  17614.       }
  17615.   #ifdef    BERK
  17616.       if (str == NULL || *str == '\0') {
  17617. ! #else     not BERK
  17618.       if (pers == NULL
  17619.           && mbox == NULL && host == NULL && route == NULL
  17620.           && grp == NULL) {
  17621. ! #endif    not BERK
  17622.       if (eresult)
  17623.           (void) strcpy (eresult, "null address");
  17624.       else
  17625. --- 344,354 ----
  17626.       }
  17627.   #ifdef    BERK
  17628.       if (str == NULL || *str == '\0') {
  17629. ! #else /* not BERK */
  17630.       if (pers == NULL
  17631.           && mbox == NULL && host == NULL && route == NULL
  17632.           && grp == NULL) {
  17633. ! #endif /* not BERK */
  17634.       if (eresult)
  17635.           (void) strcpy (eresult, "null address");
  17636.       else
  17637. ***************
  17638. *** 370,376 ****
  17639.       dfhost = LocalName ();
  17640.       dftype = LOCALHOST;
  17641.       }
  17642. ! #endif    not BERK
  17643.   
  17644.       mp = (struct mailname  *) calloc ((unsigned) 1, sizeof *mp);
  17645.       if (mp == NULL) {
  17646. --- 370,376 ----
  17647.       dfhost = LocalName ();
  17648.       dftype = LOCALHOST;
  17649.       }
  17650. ! #endif /* not BERK */
  17651.   
  17652.       mp = (struct mailname  *) calloc ((unsigned) 1, sizeof *mp);
  17653.       if (mp == NULL) {
  17654. ***************
  17655. *** 389,395 ****
  17656.       mp -> m_mbox = getcpy (adr);
  17657.       if (!index (adr, '@') && !index (adr, '!'))
  17658.       mp -> m_nohost = 1;
  17659. ! #else    not BERK
  17660.       if (pers)
  17661.       mp -> m_pers = getcpy (pers);
  17662.   
  17663. --- 389,395 ----
  17664.       mp -> m_mbox = getcpy (adr);
  17665.       if (!index (adr, '@') && !index (adr, '!'))
  17666.       mp -> m_nohost = 1;
  17667. ! #else /* not BERK */
  17668.       if (pers)
  17669.       mp -> m_pers = getcpy (pers);
  17670.   
  17671. ***************
  17672. *** 414,420 ****
  17673.           *pp = NULL;
  17674.           goto get_uucp;
  17675.       }
  17676. ! #else    not MMDFMTS
  17677.       if (up && (pp = index (host, '.')) 
  17678.           && uleq (up, pp + 1)) {/* uucpaddr@host.<uucp> */
  17679.           *pp = NULL;
  17680. --- 414,420 ----
  17681.           *pp = NULL;
  17682.           goto get_uucp;
  17683.       }
  17684. ! #else /* not MMDFMTS */
  17685.       if (up && (pp = index (host, '.')) 
  17686.           && uleq (up, pp + 1)) {/* uucpaddr@host.<uucp> */
  17687.           *pp = NULL;
  17688. ***************
  17689. *** 423,429 ****
  17690.           mp -> m_type = UUCPHOST;
  17691.           goto got_host;
  17692.       }
  17693. ! #endif    not MMDFMTS
  17694.       if (up && uleq (dfhost, LocalName ())
  17695.           && uleq (up, host)) {/* uucpaddr@<uucp> [local] */
  17696.           if (pp = index (mbox, '!')) {
  17697. --- 423,429 ----
  17698.           mp -> m_type = UUCPHOST;
  17699.           goto got_host;
  17700.       }
  17701. ! #endif /* not MMDFMTS */
  17702.       if (up && uleq (dfhost, LocalName ())
  17703.           && uleq (up, host)) {/* uucpaddr@<uucp> [local] */
  17704.           if (pp = index (mbox, '!')) {
  17705. ***************
  17706. *** 438,450 ****
  17707.           mp -> m_type = UUCPHOST;
  17708.           goto got_host;
  17709.       }
  17710. ! #endif    MF
  17711.       mp -> m_mbox = getcpy (mbox);
  17712.       mp -> m_host = getcpy (host);
  17713.       }
  17714.       else {
  17715.       if (pp = index (mbox, '!')) {
  17716. !         *pp++ = NULL;
  17717.           mp -> m_mbox = getcpy (pp);
  17718.           mp -> m_host = getcpy (mbox);
  17719.           mp -> m_type = UUCPHOST;
  17720. --- 438,450 ----
  17721.           mp -> m_type = UUCPHOST;
  17722.           goto got_host;
  17723.       }
  17724. ! #endif /* MF */
  17725.       mp -> m_mbox = getcpy (mbox);
  17726.       mp -> m_host = getcpy (host);
  17727.       }
  17728.       else {
  17729.       if (pp = index (mbox, '!')) {
  17730. !         *pp++ = '\0';
  17731.           mp -> m_mbox = getcpy (pp);
  17732.           mp -> m_host = getcpy (mbox);
  17733.           mp -> m_type = UUCPHOST;
  17734. ***************
  17735. *** 458,464 ****
  17736.           mp -> m_type = dftype;
  17737.           }
  17738.           else
  17739. ! #endif    DUMB
  17740.           {
  17741.           mp -> m_host = route ? NULLCP : getcpy (dfhost);
  17742.           mp -> m_type = route ? NETHOST : dftype;
  17743. --- 458,464 ----
  17744.           mp -> m_type = dftype;
  17745.           }
  17746.           else
  17747. ! #endif /* DUMB */
  17748.           {
  17749.           mp -> m_host = route ? NULLCP : getcpy (dfhost);
  17750.           mp -> m_type = route ? NETHOST : dftype;
  17751. ***************
  17752. *** 476,482 ****
  17753.       else
  17754.       mp -> m_type = uleq (LocalName (), mp -> m_host) ? LOCALHOST
  17755.           : NETHOST;
  17756. ! #else    not DUMB
  17757.       else
  17758.       if (pp = OfficialName (mp -> m_host)) {
  17759.       got_real_host: ;
  17760. --- 476,482 ----
  17761.       else
  17762.       mp -> m_type = uleq (LocalName (), mp -> m_host) ? LOCALHOST
  17763.           : NETHOST;
  17764. ! #else /* not DUMB */
  17765.       else
  17766.       if (pp = OfficialName (mp -> m_host)) {
  17767.       got_real_host: ;
  17768. ***************
  17769. *** 494,500 ****
  17770.           }
  17771.           mp -> m_type = BADHOST;
  17772.       }
  17773. ! #endif    not DUMB
  17774.   
  17775.   got_host: ;
  17776.       if (route)
  17777. --- 494,500 ----
  17778.           }
  17779.           mp -> m_type = BADHOST;
  17780.       }
  17781. ! #endif /* not DUMB */
  17782.   
  17783.   got_host: ;
  17784.       if (route)
  17785. ***************
  17786. *** 504,510 ****
  17787.       mp -> m_gname = getcpy (grp);
  17788.       if (note)
  17789.       mp -> m_note = getcpy (note);
  17790. ! #endif    not BERK
  17791.   
  17792.       return mp;
  17793.   }
  17794. --- 504,510 ----
  17795.       mp -> m_gname = getcpy (grp);
  17796.       if (note)
  17797.       mp -> m_note = getcpy (note);
  17798. ! #endif /* not BERK */
  17799.   
  17800.       return mp;
  17801.   }
  17802. ***************
  17803. *** 534,540 ****
  17804.   #ifdef    MHMTS
  17805.       if (mp -> m_aka)
  17806.       free (mp -> m_aka);
  17807. ! #endif    MHMTS
  17808.   
  17809.       free ((char *) mp);
  17810.   }
  17811. --- 534,540 ----
  17812.   #ifdef    MHMTS
  17813.       if (mp -> m_aka)
  17814.       free (mp -> m_aka);
  17815. ! #endif /* MHMTS */
  17816.   
  17817.       free ((char *) mp);
  17818.   }
  17819. ***************
  17820. *** 548,556 ****
  17821.   #ifndef    BERK
  17822.   #ifdef    MF
  17823.       char   *up = UucpChan ();
  17824. ! #endif    MF
  17825.       static char addr[BUFSIZ];
  17826. ! #endif    not BERK
  17827.       static char buffer[BUFSIZ];
  17828.   
  17829.   #ifdef    BERK
  17830. --- 548,556 ----
  17831.   #ifndef    BERK
  17832.   #ifdef    MF
  17833.       char   *up = UucpChan ();
  17834. ! #endif /* MF */
  17835.       static char addr[BUFSIZ];
  17836. ! #endif /* not BERK */
  17837.       static char buffer[BUFSIZ];
  17838.   
  17839.   #ifdef    BERK
  17840. ***************
  17841. *** 559,565 ****
  17842.       (void) sprintf (buffer, "%s <%s>", mp->m_pers, mp->m_mbox);
  17843.       else
  17844.       (void) strcpy (buffer, mp -> m_text);
  17845. ! #else    not BERK
  17846.   
  17847.   #ifdef    MF
  17848.       if (up && mp -> m_type == UUCPHOST)
  17849. --- 559,565 ----
  17850.       (void) sprintf (buffer, "%s <%s>", mp->m_pers, mp->m_mbox);
  17851.       else
  17852.       (void) strcpy (buffer, mp -> m_text);
  17853. ! #else /* not BERK */
  17854.   
  17855.   #ifdef    MF
  17856.       if (up && mp -> m_type == UUCPHOST)
  17857. ***************
  17858. *** 566,582 ****
  17859.   #ifdef    MMDFMTS
  17860.       (void) sprintf (addr, "%s!%s%%%s@%s", mp -> m_host, mp -> m_mbox,
  17861.           up, LocalName ());
  17862. ! #else    not MMDFMTS
  17863.       (void) sprintf (addr, "%s@%s.%s", mp -> m_mbox, mp -> m_host, up);
  17864. ! #endif    not MMDFMTS
  17865.       else 
  17866. ! #endif    MF
  17867.   
  17868.   #ifdef    DUMB
  17869.       if (mp -> m_nohost)
  17870.           (void) strcpy (addr, mp -> m_mbox ? mp -> m_mbox : "");
  17871.       else
  17872. ! #endif    DUMB
  17873.   
  17874.   #ifndef    BANG
  17875.       if (mp -> m_type != UUCPHOST)
  17876. --- 566,582 ----
  17877.   #ifdef    MMDFMTS
  17878.       (void) sprintf (addr, "%s!%s%%%s@%s", mp -> m_host, mp -> m_mbox,
  17879.           up, LocalName ());
  17880. ! #else /* not MMDFMTS */
  17881.       (void) sprintf (addr, "%s@%s.%s", mp -> m_mbox, mp -> m_host, up);
  17882. ! #endif /* not MMDFMTS */
  17883.       else 
  17884. ! #endif /* MF */
  17885.   
  17886.   #ifdef    DUMB
  17887.       if (mp -> m_nohost)
  17888.           (void) strcpy (addr, mp -> m_mbox ? mp -> m_mbox : "");
  17889.       else
  17890. ! #endif /* DUMB */
  17891.   
  17892.   #ifndef    BANG
  17893.       if (mp -> m_type != UUCPHOST)
  17894. ***************
  17895. *** 583,589 ****
  17896.           (void) sprintf (addr, mp -> m_host ? "%s%s@%s" : "%s%s",
  17897.           mp -> m_path ? mp -> m_path : "", mp -> m_mbox, mp -> m_host);
  17898.       else
  17899. ! #endif    not BANG
  17900.           (void) sprintf (addr, "%s!%s", mp -> m_host, mp -> m_mbox);
  17901.   
  17902.       if (!extras)
  17903. --- 583,589 ----
  17904.           (void) sprintf (addr, mp -> m_host ? "%s%s@%s" : "%s%s",
  17905.           mp -> m_path ? mp -> m_path : "", mp -> m_mbox, mp -> m_host);
  17906.       else
  17907. ! #endif /* not BANG */
  17908.           (void) sprintf (addr, "%s!%s", mp -> m_host, mp -> m_mbox);
  17909.   
  17910.       if (!extras)
  17911. ***************
  17912. *** 603,609 ****
  17913.           (void) sprintf (buffer, "%s %s", addr, mp -> m_note);
  17914.       else
  17915.           (void) strcpy (buffer, addr);
  17916. ! #endif    not BERK
  17917.   
  17918.       return buffer;
  17919.   }
  17920. --- 603,609 ----
  17921.           (void) sprintf (buffer, "%s %s", addr, mp -> m_note);
  17922.       else
  17923.           (void) strcpy (buffer, addr);
  17924. ! #endif /* not BERK */
  17925.   
  17926.       return buffer;
  17927.   }
  17928. ***************
  17929. *** 626,632 ****
  17930.   #ifdef    REALLYDUMB
  17931.       return getusr ();
  17932.       else
  17933. ! #endif    REALLYDUMB
  17934.       local = getusr ();
  17935.   
  17936.       if (domain == NULL)
  17937. --- 626,632 ----
  17938.   #ifdef    REALLYDUMB
  17939.       return getusr ();
  17940.       else
  17941. ! #endif /* REALLYDUMB */
  17942.       local = getusr ();
  17943.   
  17944.       if (domain == NULL)
  17945. ***************
  17946. *** 633,646 ****
  17947.   #ifdef    REALLYDUMB
  17948.       return local;
  17949.       else
  17950. ! #endif    REALLYDUMB
  17951.       domain = LocalName ();
  17952.   
  17953.   #ifndef    BANG
  17954.       (void) sprintf (addr, "%s@%s", local, domain);
  17955. ! #else    BANG
  17956.       (void) sprintf (addr, "%s!%s", domain, local);
  17957. ! #endif    BANG
  17958.   
  17959.       return addr;
  17960.   }
  17961. --- 633,646 ----
  17962.   #ifdef    REALLYDUMB
  17963.       return local;
  17964.       else
  17965. ! #endif /* REALLYDUMB */
  17966.       domain = LocalName ();
  17967.   
  17968.   #ifndef    BANG
  17969.       (void) sprintf (addr, "%s@%s", local, domain);
  17970. ! #else /* BANG */
  17971.       (void) sprintf (addr, "%s!%s", domain, local);
  17972. ! #endif /* BANG */
  17973.   
  17974.       return addr;
  17975.   }
  17976. ***************
  17977. *** 667,673 ****
  17978.   #ifndef    BERK
  17979.       register char  *pp;
  17980.       char    buffer[BUFSIZ];
  17981. ! #endif    not BERK
  17982.       register struct mailname   *mp;
  17983.       static char *am = NULL;
  17984.       static struct mailname  mq={NULL};
  17985. --- 667,673 ----
  17986.   #ifndef    BERK
  17987.       register char  *pp;
  17988.       char    buffer[BUFSIZ];
  17989. ! #endif /* not BERK */
  17990.       register struct mailname   *mp;
  17991.       static char *am = NULL;
  17992.       static struct mailname  mq={NULL};
  17993. ***************
  17994. *** 700,708 ****
  17995.               if (mp -> m_mbox[mp -> m_ingrp - 1] == '*') {
  17996.               mp -> m_type |= W_MEND;
  17997.               mp -> m_ingrp--;
  17998. !             mp -> m_mbox[mp -> m_ingrp] = NULL;
  17999.               }
  18000. ! #else    not BERK
  18001.               /* owing to screwy munging, wildcarding is a great idea
  18002.                  even under #ifndef BERK, so... */
  18003.               mp -> m_type = W_NIL;
  18004. --- 700,708 ----
  18005.               if (mp -> m_mbox[mp -> m_ingrp - 1] == '*') {
  18006.               mp -> m_type |= W_MEND;
  18007.               mp -> m_ingrp--;
  18008. !             mp -> m_mbox[mp -> m_ingrp] = 0;
  18009.               }
  18010. ! #else /* not BERK */
  18011.               /* owing to screwy munging, wildcarding is a great idea
  18012.                  even under #ifndef BERK, so... */
  18013.               mp -> m_type = W_NIL;
  18014. ***************
  18015. *** 710,728 ****
  18016.               mp -> m_type |= W_MBEG, mp -> m_mbox++;
  18017.               if (*(cp = mp -> m_mbox + strlen (mp -> m_mbox) - 1)
  18018.                   == '*')
  18019. !             mp -> m_type |= W_MEND, *cp = NULL;
  18020.               if (mp -> m_host) {
  18021.               if (*mp -> m_host == '*')
  18022.                   mp -> m_type |= W_HBEG, mp -> m_host++;
  18023.               if (*(cp = mp -> m_host + strlen (mp -> m_host) - 1)
  18024.                   == '*')
  18025. !                 mp -> m_type |= W_HEND, *cp = NULL;
  18026.               }
  18027.               if ((cp = getenv ("MHWDEBUG")) && *cp)
  18028.               fprintf (stderr, "mbox=\"%s\" host=\"%s\" %s\n",
  18029.                   mp -> m_mbox, mp -> m_host,
  18030.                   sprintb (buffer, (unsigned) mp -> m_type, WBITS));
  18031. ! #endif    not BERK
  18032.           }
  18033.           if (oops)
  18034.           advise (NULLCP, "please fix the %s: entry in your %s file",
  18035. --- 710,728 ----
  18036.               mp -> m_type |= W_MBEG, mp -> m_mbox++;
  18037.               if (*(cp = mp -> m_mbox + strlen (mp -> m_mbox) - 1)
  18038.                   == '*')
  18039. !             mp -> m_type |= W_MEND, *cp = '\0';
  18040.               if (mp -> m_host) {
  18041.               if (*mp -> m_host == '*')
  18042.                   mp -> m_type |= W_HBEG, mp -> m_host++;
  18043.               if (*(cp = mp -> m_host + strlen (mp -> m_host) - 1)
  18044.                   == '*')
  18045. !                 mp -> m_type |= W_HEND, *cp = '\0';
  18046.               }
  18047.               if ((cp = getenv ("MHWDEBUG")) && *cp)
  18048.               fprintf (stderr, "mbox=\"%s\" host=\"%s\" %s\n",
  18049.                   mp -> m_mbox, mp -> m_host,
  18050.                   sprintb (buffer, (unsigned) mp -> m_type, WBITS));
  18051. ! #endif /* not BERK */
  18052.           }
  18053.           if (oops)
  18054.           advise (NULLCP, "please fix the %s: entry in your %s file",
  18055. ***************
  18056. *** 736,742 ****
  18057.       cp = np -> m_mbox;
  18058.       if (strcmp (cp, mq.m_mbox) == 0)
  18059.       return 1;
  18060. ! #else    not BERK
  18061.       switch (np -> m_type) {
  18062.       case NETHOST:
  18063.           len = strlen (cp = LocalName ());
  18064. --- 736,742 ----
  18065.       cp = np -> m_mbox;
  18066.       if (strcmp (cp, mq.m_mbox) == 0)
  18067.       return 1;
  18068. ! #else /* not BERK */
  18069.       switch (np -> m_type) {
  18070.       case NETHOST:
  18071.           len = strlen (cp = LocalName ());
  18072. ***************
  18073. *** 756,762 ****
  18074.       default:
  18075.           break;
  18076.       }
  18077. ! #endif    not BERK
  18078.   
  18079.   #ifdef    BERK
  18080.       len = strlen (cp);
  18081. --- 756,762 ----
  18082.       default:
  18083.           break;
  18084.       }
  18085. ! #endif /* not BERK */
  18086.   
  18087.   #ifdef    BERK
  18088.       len = strlen (cp);
  18089. ***************
  18090. *** 783,789 ****
  18091.               if (strncmp (&cp[i], mp -> m_mbox, mp -> m_ingrp) == 0)
  18092.                   return 1;
  18093.           }
  18094. ! #else    not BERK
  18095.       for (mp = &mq; mp = mp -> m_next;) {
  18096.       if (np -> m_mbox == NULL)
  18097.           continue;
  18098. --- 783,789 ----
  18099.               if (strncmp (&cp[i], mp -> m_mbox, mp -> m_ingrp) == 0)
  18100.                   return 1;
  18101.           }
  18102. ! #else /* not BERK */
  18103.       for (mp = &mq; mp = mp -> m_next;) {
  18104.       if (np -> m_mbox == NULL)
  18105.           continue;
  18106. ***************
  18107. *** 836,842 ****
  18108.       }
  18109.       return 1;
  18110.       }
  18111. ! #endif    not BERK
  18112.   
  18113.       return 0;
  18114.   }
  18115. --- 836,842 ----
  18116.       }
  18117.       return 1;
  18118.       }
  18119. ! #endif /* not BERK */
  18120.   
  18121.       return 0;
  18122.   }
  18123. *** ../mh-6.7.2/sbr/advertise.c    Thu Oct 29 15:00:23 1987
  18124. --- sbr/advertise.c    Mon Dec 14 16:20:26 1992
  18125. ***************
  18126. *** 1,4 ****
  18127. --- 1,7 ----
  18128.   /* advertise.c - the heart of adios */
  18129. + #ifndef    lint
  18130. + static char ident[] = "@(#)$Id: advertise.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  18131. + #endif    /* lint */
  18132.   
  18133.   #include "../h/mh.h"
  18134.   #include <stdio.h>
  18135. ***************
  18136. *** 5,11 ****
  18137.   #ifdef    BSD42
  18138.   #include <sys/types.h>
  18139.   #include <sys/uio.h>
  18140. ! #endif    BSD42
  18141.   
  18142.   /* For 4.2BSD systems, use writev() for slightly better performance.  Why?
  18143.      Well, there are a couple of reasons.  Primarily, it gives a smoother
  18144. --- 8,14 ----
  18145.   #ifdef    BSD42
  18146.   #include <sys/types.h>
  18147.   #include <sys/uio.h>
  18148. ! #endif    /* BSD42 */
  18149.   
  18150.   /* For 4.2BSD systems, use writev() for slightly better performance.  Why?
  18151.      Well, there are a couple of reasons.  Primarily, it gives a smoother
  18152. ***************
  18153. *** 37,43 ****
  18154.               err[BUFSIZ];
  18155.       struct iovec    iob[20];
  18156.       register struct iovec  *iov = iob;
  18157. ! #endif    BSD42
  18158.   
  18159.       (void) fflush (stdout);
  18160.   
  18161. --- 40,46 ----
  18162.               err[BUFSIZ];
  18163.       struct iovec    iob[20];
  18164.       register struct iovec  *iov = iob;
  18165. ! #endif    /* BSD42 */
  18166.   
  18167.       (void) fflush (stdout);
  18168.   
  18169. ***************
  18170. *** 56,62 ****
  18171.       if (tail)
  18172.       fprintf (stderr, ", %s", tail);
  18173.       (void) fputc ('\n', stderr);
  18174. ! #else    BSD42
  18175.       (void) fflush (stderr);
  18176.   
  18177.       if (invo_name && *invo_name) {
  18178. --- 59,65 ----
  18179.       if (tail)
  18180.       fprintf (stderr, ", %s", tail);
  18181.       (void) fputc ('\n', stderr);
  18182. ! #else    /* BSD42 */
  18183.       (void) fflush (stderr);
  18184.   
  18185.       if (invo_name && *invo_name) {
  18186. ***************
  18187. *** 95,99 ****
  18188.       iov -> iov_len = strlen (iov -> iov_base = "\n");
  18189.       iov++;
  18190.       (void) writev (fileno (stderr), iob, iov - iob);
  18191. ! #endif    BSD42
  18192.   }
  18193. --- 98,102 ----
  18194.       iov -> iov_len = strlen (iov -> iov_base = "\n");
  18195.       iov++;
  18196.       (void) writev (fileno (stderr), iob, iov - iob);
  18197. ! #endif    /* BSD42 */
  18198.   }
  18199. *** ../mh-6.7.2/sbr/closefds.c    Thu Oct 29 15:00:26 1987
  18200. --- sbr/closefds.c    Mon Dec 14 16:20:27 1992
  18201. ***************
  18202. *** 1,9 ****
  18203.   /* closefds.c - close-up fd:s */
  18204.   
  18205.   #include "../h/mh.h"
  18206.   #ifndef    BSD42
  18207.   #include <stdio.h>
  18208. ! #endif    not BSD42
  18209.   
  18210.   
  18211.   void    closefds (i)
  18212. --- 1,12 ----
  18213.   /* closefds.c - close-up fd:s */
  18214. + #ifndef    lint
  18215. + static char ident[] = "@(#)$Id: closefds.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  18216. + #endif    /* lint */
  18217.   
  18218.   #include "../h/mh.h"
  18219.   #ifndef    BSD42
  18220.   #include <stdio.h>
  18221. ! #endif    /* not BSD42 */
  18222.   
  18223.   
  18224.   void    closefds (i)
  18225. ***************
  18226. *** 11,23 ****
  18227.   {
  18228.   #ifndef    BSD42
  18229.       int     nbits = _NFILE;
  18230. ! #else    BSD42
  18231.       int     nbits = getdtablesize ();
  18232. ! #endif    BSD42
  18233.   
  18234.       for (; i < nbits; i++)
  18235.   #ifdef    OVERHEAD
  18236.       if (i != fd_def && i != fd_ctx)
  18237. ! #endif    OVERHEAD
  18238.           (void) close (i);
  18239.   }
  18240. --- 14,26 ----
  18241.   {
  18242.   #ifndef    BSD42
  18243.       int     nbits = _NFILE;
  18244. ! #else    /* BSD42 */
  18245.       int     nbits = getdtablesize ();
  18246. ! #endif    /* BSD42 */
  18247.   
  18248.       for (; i < nbits; i++)
  18249.   #ifdef    OVERHEAD
  18250.       if (i != fd_def && i != fd_ctx)
  18251. ! #endif    /* OVERHEAD */
  18252.           (void) close (i);
  18253.   }
  18254. *** ../mh-6.7.2/sbr/cpydgst.c    Thu Oct 29 15:00:27 1987
  18255. --- sbr/cpydgst.c    Mon Dec 14 16:20:27 1992
  18256. ***************
  18257. *** 1,4 ****
  18258. --- 1,7 ----
  18259.   /* cpydgst.c - copy from one fd to another in encapsulating mode */
  18260. + #ifndef    lint
  18261. + static char ident[] = "@(#)$Id: cpydgst.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  18262. + #endif    /* lint */
  18263.   
  18264.   #include "../h/mh.h"
  18265.   #include <stdio.h>
  18266. ***************
  18267. *** 46,52 ****
  18268.       dp = (bp = outbuf) + sizeof outbuf;
  18269.       for (state = S1; (i = read (in, buffer, sizeof buffer)) > 0;)
  18270.       for (ep = (cp = buffer) + i; cp < ep; cp++) {
  18271. !         if (*cp == NULL)
  18272.           continue;
  18273.           switch (state) {
  18274.           case S1: 
  18275. --- 49,55 ----
  18276.       dp = (bp = outbuf) + sizeof outbuf;
  18277.       for (state = S1; (i = read (in, buffer, sizeof buffer)) > 0;)
  18278.       for (ep = (cp = buffer) + i; cp < ep; cp++) {
  18279. !         if (*cp == '\0')
  18280.           continue;
  18281.           switch (state) {
  18282.           case S1: 
  18283. *** ../mh-6.7.2/sbr/discard.c    Thu Feb 14 14:49:10 1991
  18284. --- sbr/discard.c    Mon Dec 14 16:20:28 1992
  18285. ***************
  18286. *** 1,19 ****
  18287.   /* discard.c - discard output on a file pointer */
  18288.   #ifndef    lint
  18289. ! static char ident[] = "@(#)$Id: discard.c,v 1.4 90/04/05 15:31:32 sources Exp $";
  18290. ! #endif    lint
  18291.   
  18292.   #include "../h/mh.h"
  18293.   #include <stdio.h>
  18294.   #ifndef    SYS5
  18295.   #include <sgtty.h>
  18296. ! #else    SYS5
  18297.   #include <sys/types.h>
  18298.   #include <termio.h>
  18299.   #ifndef    NOIOCTLH
  18300.   #include <sys/ioctl.h>
  18301. ! #endif    NOIOCTLH
  18302. ! #endif    SYS5
  18303.   
  18304.   
  18305.   void    discard (io)
  18306. --- 1,19 ----
  18307.   /* discard.c - discard output on a file pointer */
  18308.   #ifndef    lint
  18309. ! static char ident[] = "@(#)$Id: discard.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  18310. ! #endif    /* lint */
  18311.   
  18312.   #include "../h/mh.h"
  18313.   #include <stdio.h>
  18314.   #ifndef    SYS5
  18315.   #include <sgtty.h>
  18316. ! #else    /* SYS5 */
  18317.   #include <sys/types.h>
  18318.   #include <termio.h>
  18319.   #ifndef    NOIOCTLH
  18320.   #include <sys/ioctl.h>
  18321. ! #endif    /* NOIOCTLH */
  18322. ! #endif    /* SYS5 */
  18323.   
  18324.   
  18325.   void    discard (io)
  18326. ***************
  18327. *** 21,29 ****
  18328.   {
  18329.   #ifndef    SYS5
  18330.       struct sgttyb   sg;
  18331. ! #else    SYS5
  18332.       struct termio   sg;
  18333. ! #endif    SYS5
  18334.   
  18335.       if (io == NULL)
  18336.       return;
  18337. --- 21,29 ----
  18338.   {
  18339.   #ifndef    SYS5
  18340.       struct sgttyb   sg;
  18341. ! #else    /* SYS5 */
  18342.       struct termio   sg;
  18343. ! #endif    /* SYS5 */
  18344.   
  18345.       if (io == NULL)
  18346.       return;
  18347. ***************
  18348. *** 31,40 ****
  18349.   #ifndef    SYS5
  18350.       if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
  18351.       (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
  18352. ! #else    SYS5
  18353.       if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
  18354.       (void) ioctl (fileno (io), TCSETA, &sg);
  18355. ! #endif    SYS5
  18356.   
  18357.       if (io -> _ptr = io -> _base)
  18358.       io -> _cnt = 0;
  18359. --- 31,40 ----
  18360.   #ifndef    SYS5
  18361.       if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
  18362.       (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
  18363. ! #else    /* SYS5 */
  18364.       if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
  18365.       (void) ioctl (fileno (io), TCSETA, &sg);
  18366. ! #endif    /* SYS5 */
  18367.   
  18368.       if (io -> _ptr = io -> _base)
  18369.       io -> _cnt = 0;
  18370. *** ../mh-6.7.2/sbr/fmtcompile.c    Thu Jan 23 15:11:10 1992
  18371. --- sbr/fmtcompile.c    Mon Dec 14 16:20:29 1992
  18372. ***************
  18373. *** 1,7 ****
  18374.   /* fmtcompile.c - "compile" format strings for fmtscan */
  18375.   #ifndef    lint
  18376. ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.10 1992/01/23 23:10:58 jromine Exp $";
  18377. ! #endif    lint
  18378.   
  18379.   #include "../h/mh.h"
  18380.   #include "../h/addrsbr.h"
  18381. --- 1,7 ----
  18382.   /* fmtcompile.c - "compile" format strings for fmtscan */
  18383.   #ifndef    lint
  18384. ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.15 1992/12/15 00:20:22 jromine Exp $";
  18385. ! #endif    /* lint */
  18386.   
  18387.   #include "../h/mh.h"
  18388.   #include "../h/addrsbr.h"
  18389. ***************
  18390. *** 72,77 ****
  18391. --- 72,78 ----
  18392.       "cur",    TF_NONE,    FT_LV_DAT,    1,        TFL_PUTN,
  18393.       "size",    TF_NONE,    FT_LV_DAT,    2,        TFL_PUTN,
  18394.       "width",    TF_NONE,    FT_LV_DAT,    3,        TFL_PUTN,
  18395. +     "unseen",   TF_NONE,    FT_LV_DAT,    4,        TFL_PUTN,
  18396.       "dat",    TF_NUM,        FT_LV_DAT,    0,        TFL_PUTN,
  18397.       "strlen",    TF_NONE,    FT_LV_STRLEN,    0,        TFL_PUTN,
  18398.       "me",    TF_MYBOX,    FT_LS_LIT,    0,        TFL_PUTS,
  18399. ***************
  18400. *** 78,83 ****
  18401. --- 79,85 ----
  18402.       "plus",    TF_NUM,        FT_LV_PLUS_L,    0,        TFL_PUTN,
  18403.       "minus",    TF_NUM,        FT_LV_MINUS_L,    0,        TFL_PUTN,
  18404.       "divide",    TF_NUM,        FT_LV_DIVIDE_L,    0,        TFL_PUTN,
  18405. +     "modulo",    TF_NUM,        FT_LV_MODULO_L,    0,        TFL_PUTN,
  18406.       "charleft",    TF_NONE,    FT_LV_CHAR_LEFT, 0,        TFL_PUTN,
  18407.       "timenow",    TF_NOW,        FT_LV_LIT,    0,        TFL_PUTN,
  18408.   
  18409. ***************
  18410. *** 121,129 ****
  18411.       "friendly",    TF_COMP,    FT_LS_FRIENDLY,    FT_PARSEADDR,    TFL_PUTS,
  18412.   
  18413.       "mymbox",    TF_COMP,    FT_LV_COMPFLAG,    FT_MYMBOX,    TFL_PUTN,
  18414. - #ifdef    VAN
  18415.       "addtoseq", TF_STR,        FT_ADDTOSEQ,    0,        0,
  18416. - #endif
  18417.   
  18418.       (char *)0,    0,        0,        0,        0    
  18419.   };
  18420. --- 123,129 ----
  18421. ***************
  18422. *** 194,200 ****
  18423. --- 194,204 ----
  18424.   
  18425.       usr_fstring[errpos] = '\0';
  18426.       for (i = errpos-errctx; i < errpos; i++)
  18427. + #ifdef LOCALE
  18428. +     if (iscntrl(usr_fstring[i]))
  18429. + #else
  18430.       if (usr_fstring[i] < 32)
  18431. + #endif
  18432.           usr_fstring[i] = '_';
  18433.       advise(NULLCP, "\"%s\": format compile error - %s",
  18434.          &usr_fstring[errpos-errctx], str);
  18435. ***************
  18436. *** 293,298 ****
  18437. --- 297,308 ----
  18438.           cp = do_loop(++cp);
  18439.           break;
  18440.   
  18441. +     case ';':    /* comment line */
  18442. +         cp++;
  18443. +         while ((c = *cp++) && c != '\n')
  18444. +         continue;
  18445. +         break;
  18446.       default:
  18447.           cp = do_spec(cp);
  18448.           break;
  18449. ***************
  18450. *** 308,314 ****
  18451.       register int c;
  18452.   #ifndef    lint
  18453.       register int ljust = 0;
  18454. ! #endif    not lint
  18455.       register int wid = 0;
  18456.       register char fill = ' ';
  18457.   
  18458. --- 318,324 ----
  18459.       register int c;
  18460.   #ifndef    lint
  18461.       register int ljust = 0;
  18462. ! #endif    /* not lint */
  18463.       register int wid = 0;
  18464.       register char fill = ' ';
  18465.   
  18466. ***************
  18467. *** 419,424 ****
  18468. --- 429,435 ----
  18469.       register int c;
  18470.       register struct ftable *t;
  18471.       register int n;
  18472. +     int mflag;        /* minus sign in NUM */
  18473.   
  18474.       infunction++;
  18475.   
  18476. ***************
  18477. *** 446,456 ****
  18478. --- 457,471 ----
  18479.       break;
  18480.   
  18481.       case TF_NUM:
  18482. +     if (mflag = (c == '-'))
  18483. +         c = *cp++;
  18484.       n = 0;
  18485.       while (isdigit(c)) {
  18486.           n = n*10 + (c - '0');
  18487.           c = *cp++;
  18488.       }
  18489. +     if (mflag)
  18490. +         n = (-n);
  18491.       LV(t->f_type,n);
  18492.       break;
  18493.   
  18494. ***************
  18495. *** 480,486 ****
  18496.       case TF_EXPR:
  18497.       *--cp = c;
  18498.       cp = do_expr(cp, t->extra);
  18499. !     LV(t->f_type, t->extra);
  18500.       c = *cp++;
  18501.       ftbl = t;
  18502.       break;
  18503. --- 495,501 ----
  18504.       case TF_EXPR:
  18505.       *--cp = c;
  18506.       cp = do_expr(cp, t->extra);
  18507. !     LV(t->f_type, 0);
  18508.       c = *cp++;
  18509.       ftbl = t;
  18510.       break;
  18511. *** ../mh-6.7.2/sbr/formatdef.c    Fri Jan 24 10:22:19 1992
  18512. --- sbr/formatdef.c    Mon Dec 14 16:20:29 1992
  18513. ***************
  18514. *** 1,7 ****
  18515.   /* formatdef.c - some defines for sbr/formatsbr.c */
  18516.   #ifndef    lint
  18517. ! static char ident[] = "@(#)$Id: formatdef.c,v 1.2 1992/01/24 18:22:15 jromine Exp $";
  18518. ! #endif    lint
  18519.   #include "../h/addrsbr.h"
  18520.   
  18521.   int    fmt_norm = AD_NAME;
  18522. --- 1,7 ----
  18523.   /* formatdef.c - some defines for sbr/formatsbr.c */
  18524.   #ifndef    lint
  18525. ! static char ident[] = "@(#)$Id: formatdef.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  18526. ! #endif    /* lint */
  18527.   #include "../h/addrsbr.h"
  18528.   
  18529.   int    fmt_norm = AD_NAME;
  18530. *** ../mh-6.7.2/sbr/formatsbr.c    Fri Jan 24 10:09:34 1992
  18531. --- sbr/formatsbr.c    Mon Dec 14 16:20:31 1992
  18532. ***************
  18533. *** 1,7 ****
  18534.   /* formatsbr.c - format string interpretation */
  18535.   #ifndef    lint
  18536. ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.14 1992/01/24 18:09:25 jromine Exp $";
  18537. ! #endif    lint
  18538.   
  18539.   #include "../h/mh.h"
  18540.   #include "../h/addrsbr.h"
  18541. --- 1,7 ----
  18542.   /* formatsbr.c - format string interpretation */
  18543.   #ifndef    lint
  18544. ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.21 1992/12/15 00:20:22 jromine Exp $";
  18545. ! #endif    /* lint */
  18546.   
  18547.   #include "../h/mh.h"
  18548.   #include "../h/addrsbr.h"
  18549. ***************
  18550. *** 21,31 ****
  18551.   
  18552.   static char  *formats = 0;
  18553.   extern char *formataddr ();    /* hook for custom address formatting */
  18554. ! #ifdef    VAN
  18555.   struct msgs *fmt_current_folder; /* current folder (set by main program) */
  18556.   #endif
  18557.   
  18558.   static normalize();
  18559.   
  18560.   extern int fmt_norm;        /* defined in sbr/formatdef.c = AD_NAME */
  18561.   struct mailname fmt_mnull;
  18562. --- 21,32 ----
  18563.   
  18564.   static char  *formats = 0;
  18565.   extern char *formataddr ();    /* hook for custom address formatting */
  18566. ! #ifdef    LBL
  18567.   struct msgs *fmt_current_folder; /* current folder (set by main program) */
  18568.   #endif
  18569.   
  18570.   static normalize();
  18571. + static int   get_x400_comp();
  18572.   
  18573.   extern int fmt_norm;        /* defined in sbr/formatdef.c = AD_NAME */
  18574.   struct mailname fmt_mnull;
  18575. ***************
  18576. *** 96,102 ****
  18577.           case '\n':
  18578.               break;
  18579.   
  18580. !         case NULL: 
  18581.               cp--;    /* fall */
  18582.           default: 
  18583.               *dp++ = *cp;
  18584. --- 97,103 ----
  18585.           case '\n':
  18586.               break;
  18587.   
  18588. !         case 0: 
  18589.               cp--;    /* fall */
  18590.           default: 
  18591.               *dp++ = *cp;
  18592. ***************
  18593. *** 103,109 ****
  18594.               break;
  18595.           }
  18596.   
  18597. !     *dp = NULL;
  18598.   }
  18599.   
  18600.   /*   */
  18601. --- 104,110 ----
  18602.               break;
  18603.           }
  18604.   
  18605. !     *dp = 0;
  18606.   }
  18607.   
  18608.   /*   */
  18609. ***************
  18610. *** 121,127 ****
  18611. --- 122,142 ----
  18612.       register char   *s1;
  18613.       register char   *s2;
  18614.   
  18615. + #ifdef LOCALE
  18616.       while (c1 = *sub) {
  18617. +     c1 = (isalpha(c1) && isupper(c1)) ? tolower(c1) : c1;
  18618. +     while ((c2 = *str++) && c1 != ((isalpha(c2) && isupper(c2)) ? tolower(c2) : c2))
  18619. +         ;
  18620. +     if (! c2)
  18621. +         return 0;
  18622. +     s1 = sub + 1; s2 = str;
  18623. +     while ((c1 = *s1++) && ((isalpha(c1) && isupper(c1)) ? tolower(c1) : c1) == ((isalpha(c2 =*s2++) && isupper(c2)) ? tolower(c2) : c2))
  18624. +         ;
  18625. +     if (! c1)
  18626. +         return 1;
  18627. +     }
  18628. + #else
  18629. +     while (c1 = *sub) {
  18630.       while ((c2 = *str++) && (c1 | 040) != (c2 | 040))
  18631.           ;
  18632.       if (! c2)
  18633. ***************
  18634. *** 132,137 ****
  18635. --- 147,153 ----
  18636.       if (! c1)
  18637.           return 1;
  18638.       }
  18639. + #endif
  18640.       return 1;
  18641.   }
  18642.   /*   */
  18643. ***************
  18644. *** 169,174 ****
  18645. --- 185,191 ----
  18646.               }\
  18647.               }\
  18648.           }
  18649. + #ifdef LOCALE
  18650.   #define PUTSF(cp, str, wid, fill) {\
  18651.           ljust = 0;\
  18652.           if ((i = (wid)) < 0) {\
  18653. ***************
  18654. *** 186,191 ****
  18655. --- 203,256 ----
  18656.                       i++;\
  18657.                   }\
  18658.               } else {\
  18659. +                 while ((c = *sp) && (iscntrl(c) || isspace(c)))\
  18660. +                 sp++;\
  18661. +             }\
  18662. +             while ((c = *sp++) && --i >= 0 && cp < ep)\
  18663. +                 if (isgraph(c)) \
  18664. +                     *cp++ = c;\
  18665. +                 else {\
  18666. +                     while ((c = *sp) && (iscntrl(c) || isspace(c)))\
  18667. +                         sp++;\
  18668. +                         *cp++ = ' ';\
  18669. +                 }\
  18670. +         }\
  18671. +         if (!ljust)\
  18672. +         while( --i >= 0 && cp < ep)\
  18673. +             *cp++ = fill;\
  18674. +     }
  18675. + #define PUTS(cp, str) {\
  18676. +         if (sp = (str)) {\
  18677. +             while ((c = *sp) && (iscntrl(c) || isspace(c)))\
  18678. +             sp++;\
  18679. +             while((c = *sp++) && cp < ep)\
  18680. +             if (isgraph(c)) \
  18681. +                 *cp++ = c;\
  18682. +             else {\
  18683. +                 while ((c = *sp) && (iscntrl(c) || isspace(c)))\
  18684. +                 sp++;\
  18685. +                 *cp++ = ' ';\
  18686. +             }\
  18687. +         }\
  18688. +     }
  18689. + #else /* LOCALE */
  18690. + #define PUTSF(cp, str, wid, fill) {\
  18691. +         ljust = 0;\
  18692. +         if ((i = (wid)) < 0) {\
  18693. +             i = -i;\
  18694. +             ljust++;\
  18695. +         }\
  18696. +         if (sp = (str)) {\
  18697. +             if (ljust) {\
  18698. +                 c = strlen(sp);\
  18699. +                 if (c > i)\
  18700. +                     sp += c - i;\
  18701. +                 else {\
  18702. +                     while( --i >= c && cp < ep)\
  18703. +                         *cp++ = fill;\
  18704. +                     i++;\
  18705. +                 }\
  18706. +             } else {\
  18707.               while ((c = *sp) && c <= 32)\
  18708.               sp++;\
  18709.               }\
  18710. ***************
  18711. *** 216,221 ****
  18712. --- 281,287 ----
  18713.               }\
  18714.           }\
  18715.           }
  18716. + #endif
  18717.   
  18718.   
  18719.   static char *lmonth[] = { "January",  "February","March",   "April",
  18720. ***************
  18721. *** 222,228 ****
  18722. --- 288,341 ----
  18723.                 "May",      "June",    "July",    "August",
  18724.                 "September","October", "November","December" };
  18725.   
  18726. + static char *get_x400_friendly (mbox, buffer)
  18727. + char   *mbox,
  18728. +        *buffer;
  18729. + {
  18730. +     char    given[BUFSIZ],
  18731. +         surname[BUFSIZ];
  18732.   
  18733. +     if (mbox == NULLCP)
  18734. +     return NULLCP;
  18735. +     if (*mbox == '"')
  18736. +     mbox++;
  18737. +     if (*mbox != '/')
  18738. +     return NULLCP;
  18739. +     if (get_x400_comp (mbox, "/PN=", buffer)) {
  18740. +     for (mbox = buffer; mbox = index (mbox, '.'); )
  18741. +         *mbox++ = 0;
  18742. +     return buffer;
  18743. +     }
  18744. +     if (!get_x400_comp (mbox, "/S=", surname))
  18745. +     return NULLCP;
  18746. +     if (get_x400_comp (mbox, "/G=", given))
  18747. +     (void) sprintf (buffer, "%s %s", given, surname);
  18748. +     else
  18749. +     (void) strcpy (buffer, surname);
  18750. +     return buffer;
  18751. + }
  18752. + static int get_x400_comp (mbox, key, buffer)
  18753. + char   *mbox,
  18754. +        *key,
  18755. +        *buffer;
  18756. + {
  18757. +     int        idx;
  18758. +     char   *cp;
  18759. +     if ((idx = stringdex (key, mbox)) < 0
  18760. +         || !(cp = index (mbox += idx + strlen (key), '/')))
  18761. +     return 0;
  18762. +     (void) sprintf (buffer, "%*.*s", cp - mbox, cp - mbox, mbox);
  18763. +     return 1;
  18764. + }
  18765.   struct format *
  18766.   fmtscan (format, scanl, width, dat)
  18767.       struct format *format;
  18768. ***************
  18769. *** 299,305 ****
  18770.           goto finished;
  18771.   
  18772.       case FT_IF_S:
  18773. !         if (str == NULLCP || *str == NULL) {
  18774.           fmt += fmt->f_skip;
  18775.           continue;
  18776.           }
  18777. --- 412,418 ----
  18778.           goto finished;
  18779.   
  18780.       case FT_IF_S:
  18781. !         if (!(value = (str && *str))) {
  18782.           fmt += fmt->f_skip;
  18783.           continue;
  18784.           }
  18785. ***************
  18786. *** 306,312 ****
  18787.           break;
  18788.   
  18789.       case FT_IF_S_NULL:
  18790. !         if (str != NULLCP && *str != NULL) {
  18791.           fmt += fmt->f_skip;
  18792.           continue;
  18793.           }
  18794. --- 419,425 ----
  18795.           break;
  18796.   
  18797.       case FT_IF_S_NULL:
  18798. !         if (!(value = (str == NULLCP || *str == 0))) {
  18799.           fmt += fmt->f_skip;
  18800.           continue;
  18801.           }
  18802. ***************
  18803. *** 334,340 ****
  18804.           break;
  18805.   
  18806.       case FT_IF_MATCH:
  18807. !         if (!str || !match (str, fmt->f_text)) {
  18808.           fmt += fmt->f_skip;
  18809.           continue;
  18810.           }
  18811. --- 447,453 ----
  18812.           break;
  18813.   
  18814.       case FT_IF_MATCH:
  18815. !         if (!(value = (str && match (str, fmt->f_text)))) {
  18816.           fmt += fmt->f_skip;
  18817.           continue;
  18818.           }
  18819. ***************
  18820. *** 342,354 ****
  18821.   
  18822.       case FT_V_MATCH:
  18823.           if (str)
  18824. !         value = match (str, fmt->f_text);
  18825.           else
  18826.           value = 0;
  18827.           break;
  18828.   
  18829.       case FT_IF_AMATCH:
  18830. !         if (!str || !uprf (str, fmt->f_text)) {
  18831.           fmt += fmt->f_skip;
  18832.           continue;
  18833.           }
  18834. --- 455,467 ----
  18835.   
  18836.       case FT_V_MATCH:
  18837.           if (str)
  18838. !         value = match (str, fmt->f_text);
  18839.           else
  18840.           value = 0;
  18841.           break;
  18842.   
  18843.       case FT_IF_AMATCH:
  18844. !         if (!(value = (str && uprf (str, fmt->f_text)))) {
  18845.           fmt += fmt->f_skip;
  18846.           continue;
  18847.           }
  18848. ***************
  18849. *** 359,369 ****
  18850.           break;
  18851.   
  18852.       case FT_S_NONNULL:
  18853. !         value = (str != NULLCP && *str != NULL);
  18854.           break;
  18855.   
  18856.       case FT_S_NULL:
  18857. !         value = (str == NULLCP || *str == NULL);
  18858.           break;
  18859.   
  18860.       case FT_V_EQ:
  18861. --- 472,482 ----
  18862.           break;
  18863.   
  18864.       case FT_S_NONNULL:
  18865. !         value = (str != NULLCP && *str != 0);
  18866.           break;
  18867.   
  18868.       case FT_S_NULL:
  18869. !         value = (str == NULLCP || *str == 0);
  18870.           break;
  18871.   
  18872.       case FT_V_EQ:
  18873. ***************
  18874. *** 450,455 ****
  18875. --- 563,574 ----
  18876.           else
  18877.           value = 0;
  18878.           break;
  18879. +     case FT_LV_MODULO_L:
  18880. +         if (fmt->f_value)
  18881. +         value = value % fmt->f_value;
  18882. +         else
  18883. +         value = 0;
  18884. +         break;
  18885.       case FT_SAVESTR:
  18886.           savestr = str;
  18887.           break;
  18888. ***************
  18889. *** 479,485 ****
  18890. --- 598,608 ----
  18891.           str = dtwszone (fmt->f_comp->c_tws);
  18892.           break;
  18893.       case FT_LV_YEAR:
  18894. + #ifndef    YEARMOD
  18895.           value = fmt->f_comp->c_tws->tw_year;
  18896. + #else    /* YEARMOD */
  18897. +         value = (fmt->f_comp->c_tws->tw_year) % 100;
  18898. + #endif    /* YEARMOD */
  18899.           break;
  18900.       case FT_LV_WDAY:
  18901.           if (!(((tws = fmt->f_comp->c_tws)->tw_flags) & (TW_SEXP|TW_SIMP)))
  18902. ***************
  18903. *** 572,578 ****
  18904.       case FT_LS_FRIENDLY:
  18905.   #ifdef BERK
  18906.           str = fmt->f_comp->c_mn->m_mbox;
  18907. ! #else not BERK
  18908.           if ((mn = fmt -> f_comp -> c_mn) == &fmt_mnull) {
  18909.           str = fmt -> f_comp -> c_text;
  18910.           break;
  18911. --- 695,701 ----
  18912.       case FT_LS_FRIENDLY:
  18913.   #ifdef BERK
  18914.           str = fmt->f_comp->c_mn->m_mbox;
  18915. ! #else    /* not BERK */
  18916.           if ((mn = fmt -> f_comp -> c_mn) == &fmt_mnull) {
  18917.           str = fmt -> f_comp -> c_text;
  18918.           break;
  18919. ***************
  18920. *** 594,600 ****
  18921.                           else
  18922.                           break;
  18923.                   }
  18924. !             } else {
  18925.       unfriendly: ;
  18926.             switch (mn -> m_type) {
  18927.               case LOCALHOST:
  18928. --- 717,723 ----
  18929.                           else
  18930.                           break;
  18931.                   }
  18932. !             } else if (!(str = get_x400_friendly (mn -> m_mbox, buffer))) {
  18933.       unfriendly: ;
  18934.             switch (mn -> m_type) {
  18935.               case LOCALHOST:
  18936. ***************
  18937. *** 616,622 ****
  18938.               break;
  18939.             }
  18940.           }
  18941. ! #endif BERK
  18942.           break;
  18943.   
  18944.       case FT_LOCALDATE:
  18945. --- 739,745 ----
  18946.               break;
  18947.             }
  18948.           }
  18949. ! #endif    /* BERK */
  18950.           break;
  18951.   
  18952.       case FT_LOCALDATE:
  18953. ***************
  18954. *** 736,743 ****
  18955.           }
  18956.           break;
  18957.   
  18958. - #ifdef    VAN
  18959.       case FT_ADDTOSEQ:
  18960.           /* If we're working on a folder (as opposed to a file), add the
  18961.            * current msg to sequence given in literal field.  Don't
  18962.            * disturb string or value registers.
  18963. --- 859,866 ----
  18964.           }
  18965.           break;
  18966.   
  18967.       case FT_ADDTOSEQ:
  18968. + #ifdef    LBL
  18969.           /* If we're working on a folder (as opposed to a file), add the
  18970.            * current msg to sequence given in literal field.  Don't
  18971.            * disturb string or value registers.
  18972. ***************
  18973. *** 744,751 ****
  18974.            */
  18975.           if (fmt_current_folder)
  18976.               (void)m_seqadd(fmt_current_folder, fmt->f_text, dat[0], -1);
  18977. -         break;
  18978.   #endif
  18979.       }
  18980.       fmt++;
  18981.       }
  18982. --- 867,874 ----
  18983.            */
  18984.           if (fmt_current_folder)
  18985.               (void)m_seqadd(fmt_current_folder, fmt->f_text, dat[0], -1);
  18986.   #endif
  18987. +         break;
  18988.       }
  18989.       fmt++;
  18990.       }
  18991. ***************
  18992. *** 753,759 ****
  18993.       finished:;
  18994.       if (cp[-1] != '\n')
  18995.       *cp++ = '\n';
  18996. !     *cp   = NULL;
  18997.       return ((struct format *)0);
  18998.   #else    /* JLR */
  18999.       if (cp[-1] != '\n')
  19000. --- 876,882 ----
  19001.       finished:;
  19002.       if (cp[-1] != '\n')
  19003.       *cp++ = '\n';
  19004. !     *cp   = 0;
  19005.       return ((struct format *)0);
  19006.   #else    /* JLR */
  19007.       if (cp[-1] != '\n')
  19008. *** ../mh-6.7.2/sbr/gans.c    Thu Oct 29 15:00:30 1987
  19009. --- sbr/gans.c    Mon Oct 26 14:50:54 1992
  19010. ***************
  19011. *** 1,4 ****
  19012. --- 1,7 ----
  19013.   /* gans.c - get an answer from the user */
  19014. + #ifndef    lint
  19015. + static char ident[] = "@(#)$Id: gans.c,v 1.2 1992/10/26 22:50:52 jromine Exp $";
  19016. + #endif /* lint */
  19017.   
  19018.   #include "../h/mh.h"
  19019.   #include <stdio.h>
  19020. ***************
  19021. *** 21,28 ****
  19022. --- 24,35 ----
  19023.           if (i == EOF)
  19024.           return 0;
  19025.           if (cp < &ansbuf[sizeof ansbuf - 1]) {
  19026. + #ifdef LOCALE
  19027. +         i = (isalpha(i) && isupper(i)) ? tolower(i) : i;
  19028. + #else
  19029.           if (i >= 'A' && i <= 'Z')
  19030.               i += 'a' - 'A';
  19031. + #endif
  19032.           *cp++ = i;
  19033.           }
  19034.       }
  19035. *** ../mh-6.7.2/sbr/getans.c    Tue Feb  6 13:03:44 1990
  19036. --- sbr/getans.c    Mon Dec 14 16:20:32 1992
  19037. ***************
  19038. *** 1,9 ****
  19039.   /* getans.c - get an answer from the user and return a string array */
  19040.   
  19041.   #include "../h/mh.h"
  19042.   #ifdef    BSD42
  19043.   #include <setjmp.h>
  19044. ! #endif    BSD42
  19045.   #include <signal.h>
  19046.   #include <stdio.h>
  19047.   
  19048. --- 1,12 ----
  19049.   /* getans.c - get an answer from the user and return a string array */
  19050. + #ifndef    lint
  19051. + static char ident[] = "@(#)$Id: getans.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  19052. + #endif    /* lint */
  19053.   
  19054.   #include "../h/mh.h"
  19055.   #ifdef    BSD42
  19056.   #include <setjmp.h>
  19057. ! #endif    /* BSD42 */
  19058.   #include <signal.h>
  19059.   #include <stdio.h>
  19060.   
  19061. ***************
  19062. *** 11,20 ****
  19063.   static    char ansbuf[BUFSIZ];
  19064.   #ifndef    BSD42
  19065.   static    int interrupted;
  19066. ! #else    BSD42
  19067.   static    jmp_buf sigenv;
  19068. ! #endif    BSD42
  19069. ! static int    intrser ();
  19070.   
  19071.   char  **getans (prompt, ansp)
  19072.   char   *prompt;
  19073. --- 14,23 ----
  19074.   static    char ansbuf[BUFSIZ];
  19075.   #ifndef    BSD42
  19076.   static    int interrupted;
  19077. ! #else    /* BSD42 */
  19078.   static    jmp_buf sigenv;
  19079. ! #endif    /* BSD42 */
  19080. ! static TYPESIG    intrser ();
  19081.   
  19082.   char  **getans (prompt, ansp)
  19083.   char   *prompt;
  19084. ***************
  19085. *** 28,34 ****
  19086.   #ifndef    BSD42
  19087.       interrupted = 0;
  19088.       istat = signal (SIGINT, intrser);
  19089. ! #else    BSD42
  19090.       switch (setjmp (sigenv)) {
  19091.       case OK: 
  19092.           istat = signal (SIGINT, intrser);
  19093. --- 31,37 ----
  19094.   #ifndef    BSD42
  19095.       interrupted = 0;
  19096.       istat = signal (SIGINT, intrser);
  19097. ! #else    /* BSD42 */
  19098.       switch (setjmp (sigenv)) {
  19099.       case OK: 
  19100.           istat = signal (SIGINT, intrser);
  19101. ***************
  19102. *** 38,44 ****
  19103.           (void) signal (SIGINT, istat);
  19104.           return NULL;
  19105.       }
  19106. ! #endif    BSD42
  19107.       for (;;) {
  19108.       printf ("%s", prompt);
  19109.       (void) fflush (stdout);
  19110. --- 41,47 ----
  19111.           (void) signal (SIGINT, istat);
  19112.           return NULL;
  19113.       }
  19114. ! #endif    /* BSD42 */
  19115.       for (;;) {
  19116.       printf ("%s", prompt);
  19117.       (void) fflush (stdout);
  19118. ***************
  19119. *** 50,59 ****
  19120.           (void) signal (SIGINT, istat);
  19121.           return NULL;
  19122.           }
  19123. ! #else    BSD42
  19124.           if (i == EOF)
  19125.           longjmp (sigenv, DONE);
  19126. ! #endif    BSD42
  19127.           if (cp < &ansbuf[sizeof ansbuf - 1])
  19128.           *cp++ = i;
  19129.       }
  19130. --- 53,62 ----
  19131.           (void) signal (SIGINT, istat);
  19132.           return NULL;
  19133.           }
  19134. ! #else    /* BSD42 */
  19135.           if (i == EOF)
  19136.           longjmp (sigenv, DONE);
  19137. ! #endif    /* BSD42 */
  19138.           if (cp < &ansbuf[sizeof ansbuf - 1])
  19139.           *cp++ = i;
  19140.       }
  19141. ***************
  19142. *** 79,89 ****
  19143.   }
  19144.   
  19145.   
  19146. ! static    int intrser () {
  19147.   #ifndef    BSD42
  19148.       (void) signal(SIGINT, intrser);
  19149.       interrupted = 1;
  19150. ! #else    BSD42
  19151.       longjmp (sigenv, NOTOK);
  19152. ! #endif    BSD42
  19153.   }
  19154. --- 82,94 ----
  19155.   }
  19156.   
  19157.   
  19158. ! static    TYPESIG intrser (i)
  19159. ! int    i;
  19160. ! {
  19161.   #ifndef    BSD42
  19162.       (void) signal(SIGINT, intrser);
  19163.       interrupted = 1;
  19164. ! #else    /* BSD42 */
  19165.       longjmp (sigenv, NOTOK);
  19166. ! #endif    /* BSD42 */
  19167.   }
  19168. *** ../mh-6.7.2/sbr/help.c    Fri Jan 24 17:19:15 1992
  19169. --- sbr/help.c    Mon Dec 14 16:20:33 1992
  19170. ***************
  19171. *** 1,7 ****
  19172.   /* help.c - print the usage line */
  19173.   #ifndef lint
  19174. ! static char ident[] = "@(#)$Id: help.c,v 1.2 1992/01/25 01:19:05 jromine Exp $";
  19175. ! #endif  lint
  19176.   
  19177.   #include "../h/mh.h"
  19178.   #include <stdio.h>
  19179. --- 1,7 ----
  19180.   /* help.c - print the usage line */
  19181.   #ifndef lint
  19182. ! static char ident[] = "@(#)$Id: help.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  19183. ! #endif    /*  lint */
  19184.   
  19185.   #include "../h/mh.h"
  19186.   #include <stdio.h>
  19187. *** ../mh-6.7.2/sbr/m_atoi.c    Thu Oct 29 15:00:32 1987
  19188. --- sbr/m_atoi.c    Mon Oct 26 14:52:09 1992
  19189. ***************
  19190. *** 1,4 ****
  19191. --- 1,7 ----
  19192.   /* m_atoi.c - parse a string representation of a message number */
  19193. + #ifndef    lint
  19194. + static char ident[] = "@(#)$Id: m_atoi.c,v 1.2 1992/10/26 22:52:05 jromine Exp $";
  19195. + #endif /* lint */
  19196.   
  19197.   #include "../h/mh.h"
  19198.   
  19199. ***************
  19200. *** 11,16 ****
  19201. --- 14,25 ----
  19202.   
  19203.       i = 0;
  19204.       cp = str;
  19205. + #ifdef LOCALE
  19206. +     while (isdigit(*cp)) {
  19207. +     i *= 10;
  19208. +     i += *cp++ - '0';
  19209. +     }
  19210. + #else
  19211.       while (*cp) {
  19212.       if (*cp < '0' || *cp > '9')
  19213.           return 0;
  19214. ***************
  19215. *** 17,22 ****
  19216. --- 26,32 ----
  19217.       i *= 10;
  19218.       i += *cp++ - '0';
  19219.       }
  19220. + #endif
  19221.   
  19222.       return i;
  19223.   }
  19224. *** ../mh-6.7.2/sbr/m_convert.c    Tue Feb 12 16:51:12 1991
  19225. --- sbr/m_convert.c    Mon Dec 14 16:20:34 1992
  19226. ***************
  19227. *** 1,7 ****
  19228.   /* m_convert.c - parse a message sequence and set SELECTED */
  19229.   #ifndef    lint
  19230. ! static char ident[] = "@(#)$Id: m_convert.c,v 1.7 91/02/12 16:51:00 mh Exp $";
  19231. ! #endif    lint
  19232.   
  19233.   #include "../h/mh.h"
  19234.   #include <stdio.h>
  19235. --- 1,7 ----
  19236.   /* m_convert.c - parse a message sequence and set SELECTED */
  19237.   #ifndef    lint
  19238. ! static char ident[] = "@(#)$Id: m_convert.c,v 1.10 1992/12/15 00:20:22 jromine Exp $";
  19239. ! #endif    /* lint */
  19240.   
  19241.   #include "../h/mh.h"
  19242.   #include <stdio.h>
  19243. ***************
  19244. *** 213,221 ****
  19245.       }
  19246.   
  19247.       bp = buf;
  19248.       while ((*cp >= 'a' && *cp <= 'z') || *cp == '.')
  19249.       *bp++ = *cp++;
  19250. !     *bp++ = NULL;
  19251.       delimp = cp;
  19252.   
  19253.       if (strcmp (buf, "first") == 0)
  19254. --- 213,225 ----
  19255.       }
  19256.   
  19257.       bp = buf;
  19258. + #ifndef LOCALE
  19259.       while ((*cp >= 'a' && *cp <= 'z') || *cp == '.')
  19260. + #else
  19261. +     while (isalpha(*cp) || *cp == '.')    /* doesn't enforce lower case */
  19262. + #endif /* LOCALE */
  19263.       *bp++ = *cp++;
  19264. !     *bp++ = 0;
  19265.       delimp = cp;
  19266.   
  19267.       if (strcmp (buf, "first") == 0)
  19268. *** ../mh-6.7.2/sbr/m_draft.c    Thu Oct 29 15:00:34 1987
  19269. --- sbr/m_draft.c    Mon Dec 14 16:20:34 1992
  19270. ***************
  19271. *** 1,4 ****
  19272. --- 1,7 ----
  19273.   /* m_draft.c - construct the draft name */
  19274. + #ifndef    lint
  19275. + static char ident[] = "@(#)$Id: m_draft.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
  19276. + #endif    /* lint */
  19277.   
  19278.   #include "../h/mh.h"
  19279.   #include <errno.h>
  19280. ***************
  19281. *** 21,27 ****
  19282.       struct stat st;
  19283.       static char buffer[BUFSIZ];
  19284.   
  19285. !     if (*isdf == NOTOK || folder == NULL || *folder == NULL) {
  19286.       if (*isdf == NOTOK || (cp = m_find ("Draft-Folder")) == NULL) {
  19287.           *isdf = 0;
  19288.           return m_maildir (msg && *msg ? msg : draft);
  19289. --- 24,30 ----
  19290.       struct stat st;
  19291.       static char buffer[BUFSIZ];
  19292.   
  19293. !     if (*isdf == NOTOK || folder == NULL || *folder == 0) {
  19294.       if (*isdf == NOTOK || (cp = m_find ("Draft-Folder")) == NULL) {
  19295.           *isdf = 0;
  19296.           return m_maildir (msg && *msg ? msg : draft);
  19297. *** ../mh-6.7.2/sbr/m_fmsg.c    Thu Oct 29 15:00:35 1987
  19298. --- sbr/m_fmsg.c    Mon Dec 14 16:20:35 1992
  19299. ***************
  19300. *** 1,4 ****
  19301. --- 1,7 ----
  19302.   /* m_fmsg.c - free a folder */
  19303. + #ifndef    lint
  19304. + static char ident[] = "@(#)$Id: m_fmsg.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  19305. + #endif    /* lint */
  19306.   
  19307.   #include "../h/mh.h"
  19308.   #include <stdio.h>
  19309. ***************
  19310. *** 16,22 ****
  19311.       free (mp -> foldpath);
  19312.   #ifdef    MTR
  19313.       free ((char *) mp -> msgbase);
  19314. ! #endif    MTR
  19315.       for (i = 0; mp -> msgattrs[i]; i++)
  19316.       free (mp -> msgattrs[i]);
  19317.       free ((char *) mp);
  19318. --- 19,25 ----
  19319.       free (mp -> foldpath);
  19320.   #ifdef    MTR
  19321.       free ((char *) mp -> msgbase);
  19322. ! #endif    /* MTR */
  19323.       for (i = 0; mp -> msgattrs[i]; i++)
  19324.       free (mp -> msgattrs[i]);
  19325.       free ((char *) mp);
  19326. *** ../mh-6.7.2/sbr/m_getdefs.c    Thu Oct 29 15:00:37 1987
  19327. --- sbr/m_getdefs.c    Mon Dec 14 16:20:36 1992
  19328. ***************
  19329. *** 1,4 ****
  19330. --- 1,7 ----
  19331.   /* m_getdefs.c - read the user's MH environment */
  19332. + #ifndef    lint
  19333. + static char ident[] = "@(#)$Id: m_getdefs.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  19334. + #endif    /* lint */
  19335.   
  19336.   #include "../h/mh.h"
  19337.   #include <stdio.h>
  19338. ***************
  19339. *** 10,27 ****
  19340.   
  19341.   extern int errno;
  19342.   
  19343.   struct    passwd    *getpwuid ();
  19344.   
  19345.   
  19346.   #ifndef    OVERHEAD
  19347.   #define    FOpen(f,m,e,c)    fopen (f, m)
  19348.   #define    FClose(f)    fclose (f)
  19349. ! #else    OVERHEAD
  19350.   FILE   *FOpen ();
  19351.   int    FClose ();
  19352.   
  19353.   long    lseek ();
  19354. ! #endif    OVERHEAD
  19355.   
  19356.   
  19357.   void m_getdefs() {
  19358. --- 13,34 ----
  19359.   
  19360.   extern int errno;
  19361.   
  19362. + #ifndef __STDC__
  19363. + #ifdef    SYS5
  19364.   struct    passwd    *getpwuid ();
  19365. + #endif
  19366. + #endif /* !__STDC__ */
  19367.   
  19368.   
  19369.   #ifndef    OVERHEAD
  19370.   #define    FOpen(f,m,e,c)    fopen (f, m)
  19371.   #define    FClose(f)    fclose (f)
  19372. ! #else    /* OVERHEAD */
  19373.   FILE   *FOpen ();
  19374.   int    FClose ();
  19375.   
  19376.   long    lseek ();
  19377. ! #endif    /* OVERHEAD */
  19378.   
  19379.   
  19380.   void m_getdefs() {
  19381. ***************
  19382. *** 30,36 ****
  19383.                      *pp;
  19384.   #if    defined (notdef) || defined (COMPAT)
  19385.       register char  *ctx;
  19386. ! #endif    notdef or COMPAT
  19387.       char    buf[BUFSIZ];
  19388.       struct stat st;
  19389.       register struct passwd *pw;
  19390. --- 37,43 ----
  19391.                      *pp;
  19392.   #if    defined (notdef) || defined (COMPAT)
  19393.       register char  *ctx;
  19394. ! #endif    /* notdef or COMPAT */
  19395.       char    buf[BUFSIZ];
  19396.       struct stat st;
  19397.       register struct passwd *pw;
  19398. ***************
  19399. *** 44,55 ****
  19400.       else
  19401.           if ((pw = getpwuid (getuid ())) == NULL
  19402.               || pw -> pw_dir == NULL
  19403. !             || *pw -> pw_dir == NULL)
  19404.           adios (NULLCP, "no HOME envariable");
  19405.           else
  19406.           mypath = getcpy (pw -> pw_dir);
  19407.       if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
  19408. !         *cp = NULL;
  19409.       }
  19410.   
  19411.       if ((cp = getenv ("MH")) && *cp) {
  19412. --- 51,62 ----
  19413.       else
  19414.           if ((pw = getpwuid (getuid ())) == NULL
  19415.               || pw -> pw_dir == NULL
  19416. !             || *pw -> pw_dir == 0)
  19417.           adios (NULLCP, "no HOME envariable");
  19418.           else
  19419.           mypath = getcpy (pw -> pw_dir);
  19420.       if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
  19421. !         *cp = 0;
  19422.       }
  19423.   
  19424.       if ((cp = getenv ("MH")) && *cp) {
  19425. ***************
  19426. *** 57,63 ****
  19427.       if ((ib = FOpen (defpath, "r", "MHFD", 0)) == NULL)
  19428.           adios (defpath, "unable to read");
  19429.       if (*cp != '/')
  19430. !         (void) putenv ("MH", defpath);
  19431.       }
  19432.       else {
  19433.       defpath = concat (mypath, "/", mh_profile, NULLCP);
  19434. --- 64,70 ----
  19435.       if ((ib = FOpen (defpath, "r", "MHFD", 0)) == NULL)
  19436.           adios (defpath, "unable to read");
  19437.       if (*cp != '/')
  19438. !         (void) m_putenv ("MH", defpath);
  19439.       }
  19440.       else {
  19441.       defpath = concat (mypath, "/", mh_profile, NULLCP);
  19442. ***************
  19443. *** 85,91 ****
  19444.   
  19445.   #if    defined (notdef) || defined (COMPAT)
  19446.       ctx = context;
  19447. ! #endif    notdef or COMPAT
  19448.       m_readefs (&m_defs, ib, mh_profile, 0);
  19449.       (void) FClose (ib);
  19450.   
  19451. --- 92,98 ----
  19452.   
  19453.   #if    defined (notdef) || defined (COMPAT)
  19454.       ctx = context;
  19455. ! #endif    /* notdef or COMPAT */
  19456.       m_readefs (&m_defs, ib, mh_profile, 0);
  19457.       (void) FClose (ib);
  19458.   
  19459. ***************
  19460. *** 136,144 ****
  19461.           (void) FClose (ib);
  19462.       }
  19463.       free (ctxpath);
  19464. ! #endif    COMPAT
  19465.   
  19466. !     if ((cp = getenv ("MHCONTEXT")) == NULL || *cp == NULL)
  19467.       cp = context;
  19468.       if ((ib = FOpen (ctxpath = getcpy (m_maildir (cp)), "r", "MHCONTEXTFD", 1))
  19469.           == NULL) {
  19470. --- 143,151 ----
  19471.           (void) FClose (ib);
  19472.       }
  19473.       free (ctxpath);
  19474. ! #endif    /* COMPAT */
  19475.   
  19476. !     if ((cp = getenv ("MHCONTEXT")) == NULL || *cp == 0)
  19477.       cp = context;
  19478.       if ((ib = FOpen (ctxpath = getcpy (m_maildir (cp)), "r", "MHCONTEXTFD", 1))
  19479.           == NULL) {
  19480. ***************
  19481. *** 145,151 ****
  19482.   #ifdef    notdef            /* XXX */
  19483.       if (cp != ctx)
  19484.           adios (ctxpath, "unable to read");
  19485. ! #endif    notdef
  19486.       }
  19487.       else {
  19488.       m_readefs ((struct node **) 0, ib, cp, 1);
  19489. --- 152,158 ----
  19490.   #ifdef    notdef            /* XXX */
  19491.       if (cp != ctx)
  19492.           adios (ctxpath, "unable to read");
  19493. ! #endif    /* notdef */
  19494.       }
  19495.       else {
  19496.       m_readefs ((struct node **) 0, ib, cp, 1);
  19497. ***************
  19498. *** 172,178 ****
  19499.       struct stat st1;
  19500.       register    FILE * fp;
  19501.   
  19502. !     if ((cp = getenv (envariable)) == NULL || *cp == NULL)
  19503.       goto not_open;
  19504.   
  19505.       if ((fd = atoi (cp)) <= fileno (stderr)) {
  19506. --- 179,185 ----
  19507.       struct stat st1;
  19508.       register    FILE * fp;
  19509.   
  19510. !     if ((cp = getenv (envariable)) == NULL || *cp == 0)
  19511.       goto not_open;
  19512.   
  19513.       if ((fd = atoi (cp)) <= fileno (stderr)) {
  19514. ***************
  19515. *** 191,197 ****
  19516.           && !strcmp (mode, "r")
  19517.           && fileno (fp) > fileno (stderr)) {
  19518.           (void) sprintf (buffer, "%d", fileno (fp));
  19519. !         if (!putenv (envariable, buffer))
  19520.           if (ctx)
  19521.               fd_ctx = fileno (fp);
  19522.           else
  19523. --- 198,204 ----
  19524.           && !strcmp (mode, "r")
  19525.           && fileno (fp) > fileno (stderr)) {
  19526.           (void) sprintf (buffer, "%d", fileno (fp));
  19527. !         if (!m_putenv (envariable, buffer))
  19528.           if (ctx)
  19529.               fd_ctx = fileno (fp);
  19530.           else
  19531. ***************
  19532. *** 239,242 ****
  19533.       fprintf (stderr, "FClose emulating close of %d (%d)\n", d1, d2);
  19534.       return i;
  19535.   }
  19536. ! #endif    OVERHEAD
  19537. --- 246,249 ----
  19538.       fprintf (stderr, "FClose emulating close of %d (%d)\n", d1, d2);
  19539.       return i;
  19540.   }
  19541. ! #endif    /* OVERHEAD */
  19542. *** ../mh-6.7.2/sbr/m_getfld.c    Mon Jan 27 10:00:52 1992
  19543. --- sbr/m_getfld.c    Wed Nov 11 16:50:06 1992
  19544. ***************
  19545. *** 1,7 ****
  19546.   /* m_getfld.c - read/parse a message */
  19547.   #ifndef    lint
  19548. ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.9 1992/01/24 18:03:41 jromine Exp $";
  19549. ! #endif    lint
  19550.   
  19551.   #include "../h/mh.h"
  19552.   #include <stdio.h>
  19553. --- 1,7 ----
  19554.   /* m_getfld.c - read/parse a message */
  19555.   #ifndef    lint
  19556. ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.14 1992/10/31 07:44:56 jromine Exp $";
  19557. ! #endif /* lint */
  19558.   
  19559.   #include "../h/mh.h"
  19560.   #include <stdio.h>
  19561. ***************
  19562. *** 246,252 ****
  19563.           j = bp - sp;
  19564.           if ((cnt -= j) <= 0) {
  19565.               if (_filbuf(iob) == EOF) {
  19566. !             *cp = *buf = NULL;
  19567.               advise (NULLCP, "eof encountered in field \"%s\"",
  19568.                   name);
  19569.               return FMTERR;
  19570. --- 246,252 ----
  19571.           j = bp - sp;
  19572.           if ((cnt -= j) <= 0) {
  19573.               if (_filbuf(iob) == EOF) {
  19574. !             *cp = *buf = 0;
  19575.               advise (NULLCP, "eof encountered in field \"%s\"",
  19576.                   name);
  19577.               return FMTERR;
  19578. ***************
  19579. *** 265,277 ****
  19580.            *  . hit the end of the buffer. (loop)
  19581.            */
  19582.           if (c == '\n') {
  19583. !             *cp = *buf = NULL;
  19584.               advise (NULLCP, "eol encountered in field \"%s\"", name);
  19585.               state = FMTERR;
  19586.               goto finish;
  19587.           }
  19588.           if ((i -= j) <= 0) {
  19589. !             *cp = *buf = NULL;
  19590.               advise (NULLCP, "field name \"%s\" exceeds %d bytes",
  19591.                   name, NAMESZ - 1);
  19592.               state = LENERR;
  19593. --- 265,277 ----
  19594.            *  . hit the end of the buffer. (loop)
  19595.            */
  19596.           if (c == '\n') {
  19597. !             *cp = *buf = 0;
  19598.               advise (NULLCP, "eol encountered in field \"%s\"", name);
  19599.               state = FMTERR;
  19600.               goto finish;
  19601.           }
  19602.           if ((i -= j) <= 0) {
  19603. !             *cp = *buf = 0;
  19604.               advise (NULLCP, "field name \"%s\" exceeds %d bytes",
  19605.                   name, NAMESZ - 1);
  19606.               state = LENERR;
  19607. ***************
  19608. *** 281,287 ****
  19609.   
  19610.           while (isspace (*--cp) && cp >= name)
  19611.           ;
  19612. !         *++cp = NULL;
  19613.           /* fall through */
  19614.   
  19615.       case FLDPLUS: 
  19616. --- 281,287 ----
  19617.   
  19618.           while (isspace (*--cp) && cp >= name)
  19619.           ;
  19620. !         *++cp = 0;
  19621.           /* fall through */
  19622.   
  19623.       case FLDPLUS: 
  19624. ***************
  19625. *** 329,335 ****
  19626.           --i;
  19627.           *cp++ = j = *(iob->_ptr + c);
  19628.           c = _filbuf(iob);
  19629. !         if (j == '\n' && c != ' ' && c != '\t') {
  19630.               if (c != EOF)
  19631.               --iob->_ptr, ++iob->_cnt;
  19632.               state = FLD;
  19633. --- 329,335 ----
  19634.           --i;
  19635.           *cp++ = j = *(iob->_ptr + c);
  19636.           c = _filbuf(iob);
  19637. !         if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') {
  19638.               if (c != EOF)
  19639.               --iob->_ptr, ++iob->_cnt;
  19640.               state = FLD;
  19641. ***************
  19642. *** 417,423 ****
  19643.           adios (NULLCP, "m_getfld() called with bogus state of %d", state);
  19644.       }
  19645.   finish:;
  19646. !     *cp = NULL;
  19647.       msg_count = cp - buf;
  19648.       return (state);
  19649.   }
  19650. --- 417,423 ----
  19651.           adios (NULLCP, "m_getfld() called with bogus state of %d", state);
  19652.       }
  19653.   finish:;
  19654. !     *cp = 0;
  19655.       msg_count = cp - buf;
  19656.       return (state);
  19657.   }
  19658. ***************
  19659. *** 426,432 ****
  19660.   
  19661.   #ifdef    RPATHS
  19662.   static char  unixbuf[BUFSIZ] = "";
  19663. ! #endif    RPATHS
  19664.   
  19665.   void
  19666.   m_unknown(iob)
  19667. --- 426,432 ----
  19668.   
  19669.   #ifdef    RPATHS
  19670.   static char  unixbuf[BUFSIZ] = "";
  19671. ! #endif /* RPATHS */
  19672.   
  19673.   void
  19674.   m_unknown(iob)
  19675. ***************
  19676. *** 459,474 ****
  19677.   #ifndef    RPATHS
  19678.       while ((c = getc (iob)) != '\n' && c >= 0)
  19679.           ;
  19680. ! #else    RPATHS
  19681.       cp = unixbuf;
  19682.       while ((c = getc (iob)) != '\n')
  19683.           *cp++ = c;
  19684. !     *cp = NULL;
  19685. ! #endif    RPATHS
  19686.       } else {
  19687.       /* not a Unix style maildrop */
  19688.       (void) fseek (iob, pos, 0);
  19689. !     if (mmdlm2 == NULLCP || *mmdlm2 == NULL)
  19690.           mmdlm2 = "\001\001\001\001\n";
  19691.       delimstr = mmdlm2;
  19692.       msg_style = MS_MMDF;
  19693. --- 459,474 ----
  19694.   #ifndef    RPATHS
  19695.       while ((c = getc (iob)) != '\n' && c >= 0)
  19696.           ;
  19697. ! #else /* RPATHS */
  19698.       cp = unixbuf;
  19699.       while ((c = getc (iob)) != '\n')
  19700.           *cp++ = c;
  19701. !     *cp = 0;
  19702. ! #endif /* RPATHS */
  19703.       } else {
  19704.       /* not a Unix style maildrop */
  19705.       (void) fseek (iob, pos, 0);
  19706. !     if (mmdlm2 == NULLCP || *mmdlm2 == 0)
  19707.           mmdlm2 = "\001\001\001\001\n";
  19708.       delimstr = mmdlm2;
  19709.       msg_style = MS_MMDF;
  19710. ***************
  19711. *** 517,523 ****
  19712.       } else {
  19713.       msg_style = MS_MMDF;
  19714.       msg_delim = (char *)fdelim + 1;
  19715. !     fdelimlen = strlen(fdelim);
  19716.       delimend = (unsigned char *)(msg_delim + edelimlen);
  19717.       }
  19718.   }
  19719. --- 517,523 ----
  19720.       } else {
  19721.       msg_style = MS_MMDF;
  19722.       msg_delim = (char *)fdelim + 1;
  19723. !     fdelimlen = strlen((char *)fdelim);
  19724.       delimend = (unsigned char *)(msg_delim + edelimlen);
  19725.       }
  19726.   }
  19727. ***************
  19728. *** 535,545 ****
  19729.       char    text[10];
  19730.   #ifdef    RPATHS
  19731.       register    char *cp;
  19732. ! #endif    RPATHS
  19733.   
  19734.       pos = ftell (iob);
  19735.       if ((i = fread (text, sizeof *text, edelimlen, iob)) != edelimlen
  19736. !         || strncmp (text, edelim, edelimlen)) {
  19737.       if (i == 0 && msg_style == MS_UUCP)
  19738.           /* the final newline in the (brain damaged) unix-format
  19739.            * maildrop is part of the delimitter - delete it.
  19740. --- 535,545 ----
  19741.       char    text[10];
  19742.   #ifdef    RPATHS
  19743.       register    char *cp;
  19744. ! #endif /* RPATHS */
  19745.   
  19746.       pos = ftell (iob);
  19747.       if ((i = fread (text, sizeof *text, edelimlen, iob)) != edelimlen
  19748. !         || strncmp (text, (char *)edelim, edelimlen)) {
  19749.       if (i == 0 && msg_style == MS_UUCP)
  19750.           /* the final newline in the (brain damaged) unix-format
  19751.            * maildrop is part of the delimitter - delete it.
  19752. ***************
  19753. *** 546,557 ****
  19754.            */
  19755.           return 1;
  19756.   
  19757. ! #ifdef notdef
  19758. !     (void) fseek (iob, (long)(pos-1), 0);
  19759. !     if (iob->_cnt <= 0)
  19760. !         _filbuf(iob);
  19761. ! #else
  19762.       (void) fseek (iob, pos, 0);
  19763.   #endif /* !notdef */
  19764.       return 0;
  19765.       }
  19766. --- 546,556 ----
  19767.            */
  19768.           return 1;
  19769.   
  19770. ! #ifdef    notdef
  19771.       (void) fseek (iob, pos, 0);
  19772. + #else
  19773. +     (void) fseek (iob, (long)(pos-1), 0);
  19774. +     (void) getc (iob);        /* should be OK */
  19775.   #endif /* !notdef */
  19776.       return 0;
  19777.       }
  19778. ***************
  19779. *** 561,572 ****
  19780.       while ((c = getc (iob)) != '\n')
  19781.           if (c < 0)
  19782.           break;
  19783. ! #else    RPATHS
  19784.       cp = unixbuf;
  19785.       while ((c = getc (iob)) != '\n' && c >= 0)
  19786.           *cp++ = c;
  19787. !     *cp = NULL;
  19788. ! #endif    RPATHS
  19789.       }
  19790.   
  19791.       return 1;
  19792. --- 560,571 ----
  19793.       while ((c = getc (iob)) != '\n')
  19794.           if (c < 0)
  19795.           break;
  19796. ! #else /* RPATHS */
  19797.       cp = unixbuf;
  19798.       while ((c = getc (iob)) != '\n' && c >= 0)
  19799.           *cp++ = c;
  19800. !     *cp = 0;
  19801. ! #endif /* RPATHS */
  19802.       }
  19803.   
  19804.       return 1;
  19805. ***************
  19806. *** 585,591 ****
  19807.       if (cp = dp = index (unixbuf, ' ')) {
  19808.       while (cp = index (cp + 1, 'r'))
  19809.           if (strncmp (cp, "remote from ", 12) == 0) {
  19810. !         *cp = NULL;
  19811.           (void) sprintf (pp, "%s!", cp + 12);
  19812.           pp += strlen (pp);
  19813.           break;
  19814. --- 584,590 ----
  19815.       if (cp = dp = index (unixbuf, ' ')) {
  19816.       while (cp = index (cp + 1, 'r'))
  19817.           if (strncmp (cp, "remote from ", 12) == 0) {
  19818. !         *cp = 0;
  19819.           (void) sprintf (pp, "%s!", cp + 12);
  19820.           pp += strlen (pp);
  19821.           break;
  19822. ***************
  19823. *** 593,606 ****
  19824.       if (cp == NULL)
  19825.           cp = unixbuf + strlen (unixbuf);
  19826.       if ((cp -= 25) >= dp)
  19827. !         *cp = NULL;
  19828.       }
  19829.   
  19830.       (void) sprintf (pp, "%s\n", unixbuf);
  19831. !     unixbuf[0] = NULL;
  19832.       return unixfrom;
  19833.   }
  19834. ! #endif    RPATHS
  19835.   
  19836.   /*   */
  19837.   
  19838. --- 592,605 ----
  19839.       if (cp == NULL)
  19840.           cp = unixbuf + strlen (unixbuf);
  19841.       if ((cp -= 25) >= dp)
  19842. !         *cp = 0;
  19843.       }
  19844.   
  19845.       (void) sprintf (pp, "%s\n", unixbuf);
  19846. !     unixbuf[0] = 0;
  19847.       return unixfrom;
  19848.   }
  19849. ! #endif /* RPATHS */
  19850.   
  19851.   /*   */
  19852.   
  19853. ***************
  19854. *** 700,705 ****
  19855.   register int   length;
  19856.   {
  19857.       while (length-- > 0)
  19858. !     *b++ = NULL;
  19859.   }
  19860. ! #endif    not BSD42
  19861. --- 699,704 ----
  19862.   register int   length;
  19863.   {
  19864.       while (length-- > 0)
  19865. !     *b++ = 0;
  19866.   }
  19867. ! #endif /* not BSD42 */
  19868. *** ../mh-6.7.2/sbr/m_gmsg.c    Tue Mar 20 15:57:39 1990
  19869. --- sbr/m_gmsg.c    Tue Oct 20 15:46:31 1992
  19870. ***************
  19871. *** 1,4 ****
  19872. --- 1,7 ----
  19873.   /* m_gmsg.c - read a folder */
  19874. + #ifndef    lint
  19875. + static char ident[] = "@(#)$Id: m_gmsg.c,v 2.10 1992/10/20 22:46:29 jromine Exp $";
  19876. + #endif /* lint */
  19877.   
  19878.   #include "../h/mh.h"
  19879.   #include "../h/local.h"
  19880. ***************
  19881. *** 8,15 ****
  19882.   #define    NINFO    (MAXFOLDER / 5)    /* PLEASE be non-trivial... */
  19883.   struct info {
  19884.       int     msgno;
  19885. !     short   stats;
  19886. !     char    pad[sizeof (int) - sizeof (short)];
  19887.   };
  19888.   
  19889.   static int  len=0;
  19890. --- 11,17 ----
  19891.   #define    NINFO    (MAXFOLDER / 5)    /* PLEASE be non-trivial... */
  19892.   struct info {
  19893.       int     msgno;
  19894. !     int     stats;
  19895.   };
  19896.   
  19897.   static int  len=0;
  19898. ***************
  19899. *** 25,31 ****
  19900.   #ifdef    COMPAT
  19901.       register int    cur,
  19902.               fd;
  19903. ! #endif    COMPAT
  19904.       register int    i,
  19905.               j;
  19906.       register struct info *rover,
  19907. --- 27,33 ----
  19908.   #ifdef    COMPAT
  19909.       register int    cur,
  19910.               fd;
  19911. ! #endif /* COMPAT */
  19912.       register int    i,
  19913.               j;
  19914.       register struct info *rover,
  19915. ***************
  19916. *** 33,47 ****
  19917.   #ifdef    COMPAT
  19918.       register char  *cp;
  19919.       char    buffer[BUFSIZ];
  19920. ! #endif    COMPAT
  19921.       register struct msgs   *mp;
  19922.   #ifdef SYS5DIR
  19923.       register struct dirent *dp;
  19924.           DIR * dd;
  19925. ! #else  SYS5DIR
  19926.       register struct direct *dp;
  19927.       register    DIR * dd;
  19928. ! #endif SYS5DIR
  19929.       struct stat st;
  19930.   
  19931.       if ((dd = opendir (name = m_mailpath (name))) == NULL) {
  19932. --- 35,49 ----
  19933.   #ifdef    COMPAT
  19934.       register char  *cp;
  19935.       char    buffer[BUFSIZ];
  19936. ! #endif /* COMPAT */
  19937.       register struct msgs   *mp;
  19938.   #ifdef SYS5DIR
  19939.       register struct dirent *dp;
  19940.           DIR * dd;
  19941. ! #else /* SYS5DIR */
  19942.       register struct direct *dp;
  19943.       register    DIR * dd;
  19944. ! #endif /* SYS5DIR */
  19945.       struct stat st;
  19946.   
  19947.       if ((dd = opendir (name = m_mailpath (name))) == NULL) {
  19948. ***************
  19949. *** 50,56 ****
  19950.       }
  19951.       (void) fstat (dd -> dd_fd, &st);
  19952.   
  19953. !     mp = (struct msgs  *) malloc (MSIZE (mp, 0, 0));
  19954.       if (mp == NULL)
  19955.       adios (NULLCP, "unable to allocate folder storage");
  19956.       mp -> lowmsg = mp -> hghmsg = mp -> nummsg = 0;
  19957. --- 52,58 ----
  19958.       }
  19959.       (void) fstat (dd -> dd_fd, &st);
  19960.   
  19961. !     mp = (struct msgs  *) malloc (MHSIZE (mp, 0, 0));
  19962.       if (mp == NULL)
  19963.       adios (NULLCP, "unable to allocate folder storage");
  19964.       mp -> lowmsg = mp -> hghmsg = mp -> nummsg = 0;
  19965. ***************
  19966. *** 57,68 ****
  19967.       mp -> curmsg = 0;
  19968.       mp -> lowsel = mp -> hghsel = mp -> numsel = 0;
  19969.       mp -> foldpath = name;
  19970. !     mp -> msgflags = NULL;
  19971.       if (st.st_uid != getuid () || access (name, 02) == NOTOK)
  19972.       mp -> msgflags |= READONLY;
  19973.   #ifdef    COMPAT
  19974.       cur = 0;
  19975. ! #endif    COMPAT
  19976.       j = strlen (SBACKUP);
  19977.       if (head == NULL)
  19978.       if ((head = (struct info *)
  19979. --- 59,70 ----
  19980.       mp -> curmsg = 0;
  19981.       mp -> lowsel = mp -> hghsel = mp -> numsel = 0;
  19982.       mp -> foldpath = name;
  19983. !     mp -> msgflags = 0;
  19984.       if (st.st_uid != getuid () || access (name, 02) == NOTOK)
  19985.       mp -> msgflags |= READONLY;
  19986.   #ifdef    COMPAT
  19987.       cur = 0;
  19988. ! #endif /* COMPAT */
  19989.       j = strlen (SBACKUP);
  19990.       if (head == NULL)
  19991.       if ((head = (struct info *)
  19992. ***************
  19993. *** 91,97 ****
  19994.           rover -> stats = EXISTS;
  19995.   #ifdef    notdef
  19996.           rover -> stats &= ~DELETED;
  19997. ! #endif    notdef
  19998.           rover++;
  19999.       }
  20000.       else
  20001. --- 93,99 ----
  20002.           rover -> stats = EXISTS;
  20003.   #ifdef    notdef
  20004.           rover -> stats &= ~DELETED;
  20005. ! #endif /* notdef */
  20006.           rover++;
  20007.       }
  20008.       else
  20009. ***************
  20010. *** 111,129 ****
  20011.                   break;
  20012.                   }
  20013.               }
  20014. ! #endif    notdef
  20015.               continue;
  20016.   
  20017.   #ifdef    MHE
  20018.           case '+': 
  20019.               continue;
  20020. ! #endif    MHE
  20021.   
  20022.   #ifdef    UCI
  20023.           case '_': 
  20024.           case '#': 
  20025.               continue;
  20026. ! #endif    UCI
  20027.   
  20028.           default: 
  20029.   #ifdef    COMPAT
  20030. --- 113,131 ----
  20031.                   break;
  20032.                   }
  20033.               }
  20034. ! #endif /* notdef */
  20035.               continue;
  20036.   
  20037.   #ifdef    MHE
  20038.           case '+': 
  20039.               continue;
  20040. ! #endif /* MHE */
  20041.   
  20042.   #ifdef    UCI
  20043.           case '_': 
  20044.           case '#': 
  20045.               continue;
  20046. ! #endif /* UCI */
  20047.   
  20048.           default: 
  20049.   #ifdef    COMPAT
  20050. ***************
  20051. *** 131,137 ****
  20052.               cur++;
  20053.               continue;
  20054.               }
  20055. ! #endif    COMPAT
  20056.               if (strcmp (dp -> d_name, LINK) == 0
  20057.                   || strncmp (dp -> d_name, SBACKUP, j) == 0)
  20058.               continue;
  20059. --- 133,139 ----
  20060.               cur++;
  20061.               continue;
  20062.               }
  20063. ! #endif /* COMPAT */
  20064.               if (strcmp (dp -> d_name, LINK) == 0
  20065.                   || strncmp (dp -> d_name, SBACKUP, j) == 0)
  20066.               continue;
  20067. ***************
  20068. *** 154,160 ****
  20069.       if (mp -> curmsg == 0 && cur && (fd = open (current, 0)) != NOTOK) {
  20070.           if ((i = read (fd, buffer, sizeof buffer)) > 0) {
  20071.           if (cp = index (buffer, '\n'))
  20072. !             *cp = NULL;
  20073.           if ((i = m_atoi (buffer)) > 0)
  20074.               mp -> curmsg = i;
  20075.           }
  20076. --- 156,162 ----
  20077.       if (mp -> curmsg == 0 && cur && (fd = open (current, 0)) != NOTOK) {
  20078.           if ((i = read (fd, buffer, sizeof buffer)) > 0) {
  20079.           if (cp = index (buffer, '\n'))
  20080. !             *cp = 0;
  20081.           if ((i = m_atoi (buffer)) > 0)
  20082.               mp -> curmsg = i;
  20083.           }
  20084. ***************
  20085. *** 164,194 ****
  20086.       (void) sprintf (buffer, "%s/%s", name, current);
  20087.       (void) unlink (buffer);
  20088.       }
  20089. ! #endif    COMPAT
  20090.   
  20091.   #ifndef    MTR
  20092.       mp -> lowoff = 1;
  20093. ! #else    MTR
  20094.       mp -> lowoff = mp -> lowmsg;
  20095. ! #endif    MTR
  20096.       mp -> hghoff = mp -> hghmsg + 1;/* for "new" in m_convert */
  20097.   
  20098.       mp = (struct msgs  *)
  20099. !         realloc ((char *) mp, MSIZE (mp, mp -> lowoff, mp -> hghoff));
  20100.       if (mp == NULL)
  20101.       adios (NULLCP, "unable to allocate folder storage");
  20102.   #ifndef    MTR
  20103.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
  20104.       mp -> msgstats[i] = 0;
  20105. ! #else    MTR
  20106. !     mp -> msgstats = (short *)
  20107. !         calloc ((unsigned) 1, MSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
  20108.       if (mp -> msgstats == NULL)
  20109.       adios (NULLCP, "unable to allocate messages storage");
  20110.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  20111. !     if (mp -> msgstats < (short *)0)    /* non portable */
  20112.       adios (NULLCP, "m_gmsg() botch -- you lose big");
  20113. ! #endif    MTR
  20114.       for (tail = head; tail < rover; tail++)
  20115.       mp -> msgstats[tail -> msgno] = tail -> stats;
  20116.       m_getatr (mp);
  20117. --- 166,196 ----
  20118.       (void) sprintf (buffer, "%s/%s", name, current);
  20119.       (void) unlink (buffer);
  20120.       }
  20121. ! #endif /* COMPAT */
  20122.   
  20123.   #ifndef    MTR
  20124.       mp -> lowoff = 1;
  20125. ! #else /* MTR */
  20126.       mp -> lowoff = mp -> lowmsg;
  20127. ! #endif /* MTR */
  20128.       mp -> hghoff = mp -> hghmsg + 1;/* for "new" in m_convert */
  20129.   
  20130.       mp = (struct msgs  *)
  20131. !         realloc ((char *) mp, MHSIZE (mp, mp -> lowoff, mp -> hghoff));
  20132.       if (mp == NULL)
  20133.       adios (NULLCP, "unable to allocate folder storage");
  20134.   #ifndef    MTR
  20135.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
  20136.       mp -> msgstats[i] = 0;
  20137. ! #else /* MTR */
  20138. !     mp -> msgstats = (int *)
  20139. !         calloc ((unsigned) 1, MHSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
  20140.       if (mp -> msgstats == NULL)
  20141.       adios (NULLCP, "unable to allocate messages storage");
  20142.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  20143. !     if (mp -> msgstats < (int *)0)    /* non portable */
  20144.       adios (NULLCP, "m_gmsg() botch -- you lose big");
  20145. ! #endif /* MTR */
  20146.       for (tail = head; tail < rover; tail++)
  20147.       mp -> msgstats[tail -> msgno] = tail -> stats;
  20148.       m_getatr (mp);
  20149. ***************
  20150. *** 216,226 ****
  20151.       bits = FFATTRSLOT;
  20152.   
  20153.       mp -> msgattrs[i = 0] = getcpy (current);
  20154. !     mp -> msgattrs[++i] = NULL;
  20155.       mp -> attrstats = 0;    /* initially, all public */
  20156.   
  20157.       m_getdefs ();
  20158. !     if (mh_seq == NULL || *mh_seq == NULL)
  20159.       goto private_only;
  20160.   
  20161.       (void) sprintf (field, "%s/%s", mp -> foldpath, mh_seq);
  20162. --- 218,228 ----
  20163.       bits = FFATTRSLOT;
  20164.   
  20165.       mp -> msgattrs[i = 0] = getcpy (current);
  20166. !     mp -> msgattrs[++i] = '\0';
  20167.       mp -> attrstats = 0;    /* initially, all public */
  20168.   
  20169.       m_getdefs ();
  20170. !     if (mh_seq == '\0' || *mh_seq == '\0')
  20171.       goto private_only;
  20172.   
  20173.       (void) sprintf (field, "%s/%s", mp -> foldpath, mh_seq);
  20174. ***************
  20175. *** 262,268 ****
  20176.           && *(np -> n_name + j) == '-'
  20177.           && strcmp (mp -> foldpath, np -> n_name + j + 1) == 0) {
  20178.           cp = getcpy (np -> n_name + alen);
  20179. !         *(cp + j - alen) = NULL;
  20180.           if ((i = m_setatr (mp, cp, getcpy (np -> n_field))) != NOTOK)
  20181.           mp -> attrstats |= 1 << (bits + i);/* private */
  20182.       }
  20183. --- 264,270 ----
  20184.           && *(np -> n_name + j) == '-'
  20185.           && strcmp (mp -> foldpath, np -> n_name + j + 1) == 0) {
  20186.           cp = getcpy (np -> n_name + alen);
  20187. !         *(cp + j - alen) = '\0';
  20188.           if ((i = m_setatr (mp, cp, getcpy (np -> n_field))) != NOTOK)
  20189.           mp -> attrstats |= 1 << (bits + i);/* private */
  20190.       }
  20191. ***************
  20192. *** 285,290 ****
  20193. --- 287,293 ----
  20194.   
  20195.       bits = FFATTRSLOT;
  20196.       hack = strcmp (current, name) == 0;/* hack... */
  20197. +     /* if we're going to use UNSEEN, it should be set here! */
  20198.   
  20199.       for (i = 0; mp -> msgattrs[i]; i++)
  20200.       if (strcmp (mp -> msgattrs[i], name) == 0) {
  20201. ***************
  20202. *** 309,324 ****
  20203.           *ap;
  20204.           ap++) {
  20205.       if (cp = index (*ap, '-'))
  20206. !         *cp++ = NULL;
  20207.       if ((j = m_atoi (*ap)) > 0) {
  20208.   #ifdef    notdef
  20209.           if (hack && j >= mp -> lowmsg && j <= mp -> hghmsg
  20210.               && (mp -> msgstats[j] & EXISTS))
  20211.           mp -> curmsg = j;
  20212. ! #else    not notdef
  20213.           if (hack)
  20214.           mp -> curmsg = j;
  20215. ! #endif    not notdef
  20216.           for (k = cp ? m_atoi (cp) : j; j <= k; j++)
  20217.           if (j >= mp -> lowmsg && j <= mp -> hghmsg
  20218.               && (mp -> msgstats[j] & EXISTS))
  20219. --- 312,327 ----
  20220.           *ap;
  20221.           ap++) {
  20222.       if (cp = index (*ap, '-'))
  20223. !         *cp++ = '\0';
  20224.       if ((j = m_atoi (*ap)) > 0) {
  20225.   #ifdef    notdef
  20226.           if (hack && j >= mp -> lowmsg && j <= mp -> hghmsg
  20227.               && (mp -> msgstats[j] & EXISTS))
  20228.           mp -> curmsg = j;
  20229. ! #else /* not notdef */
  20230.           if (hack)
  20231.           mp -> curmsg = j;
  20232. ! #endif /* not notdef */
  20233.           for (k = cp ? m_atoi (cp) : j; j <= k; j++)
  20234.           if (j >= mp -> lowmsg && j <= mp -> hghmsg
  20235.               && (mp -> msgstats[j] & EXISTS))
  20236. *** ../mh-6.7.2/sbr/m_maildir.c    Tue Feb  6 13:08:59 1990
  20237. --- sbr/m_maildir.c    Mon Dec 14 16:20:36 1992
  20238. ***************
  20239. *** 1,4 ****
  20240. --- 1,7 ----
  20241.   /* m_maildir.c - get the path for the mail directory */
  20242. + #ifndef    lint
  20243. + static char ident[] = "@(#)$Id: m_maildir.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  20244. + #endif    /* lint */
  20245.   
  20246.   #include "../h/mh.h"
  20247.   #include <stdio.h>
  20248. ***************
  20249. *** 25,31 ****
  20250.       if ((cp = exmaildir (folder))
  20251.           && (ep = cp + strlen (cp) - 1) > cp
  20252.           && *ep == '/')
  20253. !     *ep = NULL;
  20254.   
  20255.       return cp;
  20256.   }
  20257. --- 28,34 ----
  20258.       if ((cp = exmaildir (folder))
  20259.           && (ep = cp + strlen (cp) - 1) > cp
  20260.           && *ep == '/')
  20261. !     *ep = 0;
  20262.   
  20263.       return cp;
  20264.   }
  20265. *** ../mh-6.7.2/sbr/m_msgdef.c    Fri Jan 24 10:23:08 1992
  20266. --- sbr/m_msgdef.c    Mon Dec 14 16:20:37 1992
  20267. ***************
  20268. *** 1,7 ****
  20269.   /* m_msgdef.c - some defines for sbr/m_getfld.c */
  20270.   #ifndef    lint
  20271. ! static char ident[] = "@(#)$Id: m_msgdef.c,v 1.1 1992/01/24 18:22:58 jromine Exp $";
  20272. ! #endif    lint
  20273.   #include "../h/mh.h"
  20274.   
  20275.   int    msg_count = 0;    /* disgusting hack for "inc" so it can
  20276. --- 1,7 ----
  20277.   /* m_msgdef.c - some defines for sbr/m_getfld.c */
  20278.   #ifndef    lint
  20279. ! static char ident[] = "@(#)$Id: m_msgdef.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
  20280. ! #endif    /* lint */
  20281.   #include "../h/mh.h"
  20282.   
  20283.   int    msg_count = 0;    /* disgusting hack for "inc" so it can
  20284. *** ../mh-6.7.2/sbr/m_remsg.c    Tue Mar 27 16:49:27 1990
  20285. --- sbr/m_remsg.c    Mon Dec 14 16:20:37 1992
  20286. ***************
  20287. *** 1,4 ****
  20288. --- 1,7 ----
  20289.   /* m_remsg.c - realloc a msgs structure */
  20290. + #ifndef    lint
  20291. + static char ident[] = "@(#)$Id: m_remsg.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  20292. + #endif    /* lint */
  20293.   
  20294.   #include "../h/mh.h"
  20295.   #include <stdio.h>
  20296. ***************
  20297. *** 11,19 ****
  20298.   {
  20299.       int     msgnum;
  20300.   #ifdef    MTR
  20301. !     register short *sp,
  20302.              *pp;
  20303. ! #endif    MTR
  20304.   
  20305.       if (lo == 0 && (lo = mp -> lowmsg) == 0)
  20306.       lo = 1;
  20307. --- 14,22 ----
  20308.   {
  20309.       int     msgnum;
  20310.   #ifdef    MTR
  20311. !     register int   *sp,
  20312.              *pp;
  20313. ! #endif    /* MTR */
  20314.   
  20315.       if (lo == 0 && (lo = mp -> lowmsg) == 0)
  20316.       lo = 1;
  20317. ***************
  20318. *** 25,56 ****
  20319.       return mp;
  20320.   
  20321.   #ifndef    MTR
  20322. !     mp = (struct msgs  *) realloc ((char *) mp, MSIZE (mp, lo, hi));
  20323.       if (mp == NULL)
  20324.       adios (NULLCP, "unable to re-allocate folder storage");
  20325. ! #else    MTR
  20326. !     if ((sp = (short *) calloc ((unsigned) 1, MSIZEX (mp, lo, hi))) == NULL)
  20327.       adios (NULLCP, "unable to re-allocate messages storage");
  20328.   
  20329.       pp = sp - lo;
  20330. !     if (pp < (short *)0)
  20331.       adios (NULLCP, "m_remsg() botch -- you lose big[1]");
  20332.       for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
  20333.       pp[msgnum] = mp -> msgstats[msgnum];
  20334.       free ((char *) mp -> msgbase);
  20335.       mp -> msgstats = sp;
  20336. ! #endif    MTR
  20337.       mp -> lowoff = lo;
  20338.       mp -> hghoff = hi;
  20339.   #ifdef    MTR
  20340.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  20341. !     if (mp -> msgstats < (short *)0)
  20342.       adios (NULLCP, "m_remsg() botch -- you lose big[2]");
  20343. ! #endif    MTR
  20344.       for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
  20345. !     mp -> msgstats[msgnum] = NULL;
  20346.       for (msgnum = mp -> hghmsg + 1; msgnum <= hi; msgnum++)
  20347. !     mp -> msgstats[msgnum] = NULL;
  20348.   
  20349.       return mp;
  20350.   }
  20351. --- 28,59 ----
  20352.       return mp;
  20353.   
  20354.   #ifndef    MTR
  20355. !     mp = (struct msgs  *) realloc ((char *) mp, MHSIZE (mp, lo, hi));
  20356.       if (mp == NULL)
  20357.       adios (NULLCP, "unable to re-allocate folder storage");
  20358. ! #else    /* MTR */
  20359. !     if ((sp = (int *) calloc ((unsigned) 1, MHSIZEX (mp, lo, hi))) == NULL)
  20360.       adios (NULLCP, "unable to re-allocate messages storage");
  20361.   
  20362.       pp = sp - lo;
  20363. !     if (pp < (int *)0)
  20364.       adios (NULLCP, "m_remsg() botch -- you lose big[1]");
  20365.       for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
  20366.       pp[msgnum] = mp -> msgstats[msgnum];
  20367.       free ((char *) mp -> msgbase);
  20368.       mp -> msgstats = sp;
  20369. ! #endif    /* MTR */
  20370.       mp -> lowoff = lo;
  20371.       mp -> hghoff = hi;
  20372.   #ifdef    MTR
  20373.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  20374. !     if (mp -> msgstats < (int *)0)
  20375.       adios (NULLCP, "m_remsg() botch -- you lose big[2]");
  20376. ! #endif    /* MTR */
  20377.       for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
  20378. !     mp -> msgstats[msgnum] = 0;
  20379.       for (msgnum = mp -> hghmsg + 1; msgnum <= hi; msgnum++)
  20380. !     mp -> msgstats[msgnum] = 0;
  20381.   
  20382.       return mp;
  20383.   }
  20384. *** ../mh-6.7.2/sbr/m_seq.c    Thu Feb 14 14:44:50 1991
  20385. --- sbr/m_seq.c    Mon Dec 14 16:20:38 1992
  20386. ***************
  20387. *** 1,7 ****
  20388.   /* m_seq.c - print out a message sequence */
  20389.   #ifndef    lint
  20390. ! static char ident[] = "@(#)$Id: m_seq.c,v 1.7 91/02/14 14:44:38 mh Exp $";
  20391. ! #endif    lint
  20392.   
  20393.   #include "../h/mh.h"
  20394.   #include <stdio.h>
  20395. --- 1,7 ----
  20396.   /* m_seq.c - print out a message sequence */
  20397.   #ifndef    lint
  20398. ! static char ident[] = "@(#)$Id: m_seq.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  20399. ! #endif    /* lint */
  20400.   
  20401.   #include "../h/mh.h"
  20402.   #include <stdio.h>
  20403. *** ../mh-6.7.2/sbr/m_seqnew.c    Thu Feb 14 14:46:38 1991
  20404. --- sbr/m_seqnew.c    Mon Dec 14 16:20:39 1992
  20405. ***************
  20406. *** 1,7 ****
  20407.   /* m_seqnew.c - manage sequences */
  20408.   #ifndef    lint
  20409. ! static char ident[] = "@(#)$Id: m_seqnew.c,v 1.5 91/02/14 14:46:26 mh Exp $";
  20410. ! #endif    lint
  20411.   
  20412.   #include "../h/mh.h"
  20413.   #include <ctype.h>
  20414. --- 1,7 ----
  20415.   /* m_seqnew.c - manage sequences */
  20416.   #ifndef    lint
  20417. ! static char ident[] = "@(#)$Id: m_seqnew.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  20418. ! #endif    /* lint */
  20419.   
  20420.   #include "../h/mh.h"
  20421.   #include <ctype.h>
  20422. ***************
  20423. *** 147,153 ****
  20424.   {
  20425.       register char  *pp;
  20426.   
  20427. !     if (cp == NULL || *cp == NULL) {
  20428.       advise (NULLCP, "empty sequence name");
  20429.       return 0;
  20430.       }
  20431. --- 147,153 ----
  20432.   {
  20433.       register char  *pp;
  20434.   
  20435. !     if (cp == NULL || *cp == 0) {
  20436.       advise (NULLCP, "empty sequence name");
  20437.       return 0;
  20438.       }
  20439. ***************
  20440. *** 155,161 ****
  20441.       if (strcmp (cp, "new") == 0
  20442.   #ifdef    notdef
  20443.           || strcmp (cp, "cur") == 0
  20444. ! #endif    notdef
  20445.           || strcmp (cp, "all") == 0
  20446.           || strcmp (cp, "first") == 0
  20447.           || strcmp (cp, "last") == 0
  20448. --- 155,161 ----
  20449.       if (strcmp (cp, "new") == 0
  20450.   #ifdef    notdef
  20451.           || strcmp (cp, "cur") == 0
  20452. ! #endif    /* notdef */
  20453.           || strcmp (cp, "all") == 0
  20454.           || strcmp (cp, "first") == 0
  20455.           || strcmp (cp, "last") == 0
  20456. *** ../mh-6.7.2/sbr/m_sync.c    Mon Nov  5 11:47:29 1990
  20457. --- sbr/m_sync.c    Mon Dec 14 16:20:39 1992
  20458. ***************
  20459. *** 1,7 ****
  20460.   /* m_sync.c - synchronize message sequences */
  20461.   #ifndef    lint
  20462. ! static char ident[] = "@(#)$Id: m_sync.c,v 1.6 90/11/05 11:46:34 mh Exp $";
  20463. ! #endif    lint
  20464.   
  20465.   #include "../h/mh.h"
  20466.   #include <stdio.h>
  20467. --- 1,7 ----
  20468.   /* m_sync.c - synchronize message sequences */
  20469.   #ifndef    lint
  20470. ! static char ident[] = "@(#)$Id: m_sync.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  20471. ! #endif    /* lint */
  20472.   
  20473.   #include "../h/mh.h"
  20474.   #include <stdio.h>
  20475. ***************
  20476. *** 8,14 ****
  20477.   #include <signal.h>
  20478.   #ifndef    sigmask
  20479.   #define    sigmask(s)    (1 << ((s) - 1))
  20480. ! #endif    not sigmask
  20481.   
  20482.   
  20483.   /* decision logic
  20484. --- 8,14 ----
  20485.   #include <signal.h>
  20486.   #ifndef    sigmask
  20487.   #define    sigmask(s)    (1 << ((s) - 1))
  20488. ! #endif    /* not sigmask */
  20489.   
  20490.   
  20491.   /* decision logic
  20492. ***************
  20493. *** 30,38 ****
  20494.       register FILE  *fp;
  20495.   #ifndef    BSD42
  20496.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20497. ! #else    BSD42
  20498.       int        smask;
  20499. ! #endif    BSD42
  20500.   
  20501.       if (!(mp -> msgflags & SEQMOD))
  20502.       return;
  20503. --- 30,38 ----
  20504.       register FILE  *fp;
  20505.   #ifndef    BSD42
  20506.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20507. ! #else    /* BSD42 */
  20508.       int        smask;
  20509. ! #endif    /* BSD42 */
  20510.   
  20511.       if (!(mp -> msgflags & SEQMOD))
  20512.       return;
  20513. ***************
  20514. *** 44,50 ****
  20515.       fp = NULL;
  20516.   
  20517.       flags = mp -> msgflags;
  20518. !     if (mh_seq == NULL || *mh_seq == NULL)
  20519.       mp -> msgflags |= READONLY;
  20520.   
  20521.       for (i = 0; mp -> msgattrs[i]; i++) {
  20522. --- 44,50 ----
  20523.       fp = NULL;
  20524.   
  20525.       flags = mp -> msgflags;
  20526. !     if (mh_seq == NULL || *mh_seq == 0)
  20527.       mp -> msgflags |= READONLY;
  20528.   
  20529.       for (i = 0; mp -> msgattrs[i]; i++) {
  20530. ***************
  20531. *** 73,82 ****
  20532.           istat = signal (SIGINT, SIG_IGN);
  20533.           qstat = signal (SIGQUIT, SIG_IGN);
  20534.           tstat = signal (SIGTERM, SIG_IGN);
  20535. ! #else    BSD42
  20536.           smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
  20537.                       | sigmask (SIGQUIT) | sigmask (SIGTERM));
  20538. ! #endif    BSD42
  20539.           }
  20540.           fprintf (fp, "%s: %s\n", mp -> msgattrs[i], cp);
  20541.       }
  20542. --- 73,82 ----
  20543.           istat = signal (SIGINT, SIG_IGN);
  20544.           qstat = signal (SIGQUIT, SIG_IGN);
  20545.           tstat = signal (SIGTERM, SIG_IGN);
  20546. ! #else    /* BSD42 */
  20547.           smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
  20548.                       | sigmask (SIGQUIT) | sigmask (SIGTERM));
  20549. ! #endif    /* BSD42 */
  20550.           }
  20551.           fprintf (fp, "%s: %s\n", mp -> msgattrs[i], cp);
  20552.       }
  20553. ***************
  20554. *** 89,97 ****
  20555.       (void) signal (SIGINT, istat);
  20556.       (void) signal (SIGQUIT, qstat);
  20557.       (void) signal (SIGTERM, tstat);
  20558. ! #else    BSD42
  20559.       (void) sigsetmask (smask);
  20560. ! #endif    BSD42
  20561.       }
  20562.       else
  20563.       if (!(mp -> msgflags & READONLY))
  20564. --- 89,97 ----
  20565.       (void) signal (SIGINT, istat);
  20566.       (void) signal (SIGQUIT, qstat);
  20567.       (void) signal (SIGTERM, tstat);
  20568. ! #else    /* BSD42 */
  20569.       (void) sigsetmask (smask);
  20570. ! #endif    /* BSD42 */
  20571.       }
  20572.       else
  20573.       if (!(mp -> msgflags & READONLY))
  20574. *** ../mh-6.7.2/sbr/m_update.c    Tue Feb  6 13:09:01 1990
  20575. --- sbr/m_update.c    Mon Dec 14 16:20:40 1992
  20576. ***************
  20577. *** 1,4 ****
  20578. --- 1,7 ----
  20579.   /* m_update.c - update the profile */
  20580. + #ifndef    lint
  20581. + static char ident[] = "@(#)$Id: m_update.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  20582. + #endif    lint
  20583.   
  20584.   #include "../h/mh.h"
  20585.   #include <stdio.h>
  20586. ***************
  20587. *** 5,11 ****
  20588.   #include <signal.h>
  20589.   #ifndef    sigmask
  20590.   #define    sigmask(s)    (1 << ((s) - 1))
  20591. ! #endif    not sigmask
  20592.   
  20593.   static int    m_chkids();
  20594.   
  20595. --- 8,14 ----
  20596.   #include <signal.h>
  20597.   #ifndef    sigmask
  20598.   #define    sigmask(s)    (1 << ((s) - 1))
  20599. ! #endif    /* not sigmask */
  20600.   
  20601.   static int    m_chkids();
  20602.   
  20603. ***************
  20604. *** 13,21 ****
  20605.       int     action;
  20606.   #ifndef    BSD42
  20607.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20608. ! #else    BSD42
  20609.       int        smask;
  20610. ! #endif    BSD42
  20611.       register struct node   *np;
  20612.       FILE * out;
  20613.   
  20614. --- 16,24 ----
  20615.       int     action;
  20616.   #ifndef    BSD42
  20617.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20618. ! #else    /* BSD42 */
  20619.       int        smask;
  20620. ! #endif    /* BSD42 */
  20621.       register struct node   *np;
  20622.       FILE * out;
  20623.   
  20624. ***************
  20625. *** 31,40 ****
  20626.       istat = signal (SIGINT, SIG_IGN);
  20627.       qstat = signal (SIGQUIT, SIG_IGN);
  20628.       tstat = signal (SIGTERM, SIG_IGN);
  20629. ! #else    BSD42
  20630.       smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
  20631.               | sigmask (SIGQUIT) | sigmask (SIGTERM));
  20632. ! #endif    BSD42
  20633.   
  20634.       if ((out = fopen (ctxpath, "w")) == NULL)
  20635.       adios (ctxpath, "unable to write");
  20636. --- 34,43 ----
  20637.       istat = signal (SIGINT, SIG_IGN);
  20638.       qstat = signal (SIGQUIT, SIG_IGN);
  20639.       tstat = signal (SIGTERM, SIG_IGN);
  20640. ! #else    /* BSD42 */
  20641.       smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
  20642.               | sigmask (SIGQUIT) | sigmask (SIGTERM));
  20643. ! #endif    /* BSD42 */
  20644.   
  20645.       if ((out = fopen (ctxpath, "w")) == NULL)
  20646.       adios (ctxpath, "unable to write");
  20647. ***************
  20648. *** 48,56 ****
  20649.       (void) signal (SIGINT, istat);
  20650.       (void) signal (SIGQUIT, qstat);
  20651.       (void) signal (SIGTERM, tstat);
  20652. ! #else    BSD42
  20653.       (void) sigsetmask (smask);
  20654. ! #endif    BSD42
  20655.       if (action == OK)
  20656.       _exit (0);        /* we are child, time to die */
  20657.   }
  20658. --- 51,59 ----
  20659.       (void) signal (SIGINT, istat);
  20660.       (void) signal (SIGQUIT, qstat);
  20661.       (void) signal (SIGTERM, tstat);
  20662. ! #else    /* BSD42 */
  20663.       (void) sigsetmask (smask);
  20664. ! #endif    /* BSD42 */
  20665.       if (action == OK)
  20666.       _exit (0);        /* we are child, time to die */
  20667.   }
  20668. *** ../mh-6.7.2/sbr/makedir.c    Thu Jan 23 15:12:50 1992
  20669. --- sbr/makedir.c    Mon Dec 14 16:20:40 1992
  20670. ***************
  20671. *** 1,7 ****
  20672.   /* makedir.c - make a directory */
  20673.   #ifndef    lint
  20674. ! static char ident[] = "@(#)$Id: makedir.c,v 1.7 1992/01/23 23:12:43 jromine Exp $";
  20675. ! #endif    lint
  20676.   
  20677.   #if defined (BSD42) || defined (hpux)
  20678.   /* Modified to try recursive create.  Really, this should be broken
  20679. --- 1,7 ----
  20680.   /* makedir.c - make a directory */
  20681.   #ifndef    lint
  20682. ! static char ident[] = "@(#)$Id: makedir.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
  20683. ! #endif    /* lint */
  20684.   
  20685.   #if defined (BSD42) || defined (hpux)
  20686.   /* Modified to try recursive create.  Really, this should be broken
  20687. ***************
  20688. *** 14,28 ****
  20689.   #include "../h/mh.h"
  20690.   #include <stdio.h>
  20691.   
  20692. ! #if defined (BSD42)  || defined (hpux)
  20693.   #include <errno.h>
  20694.   #include <sys/param.h>
  20695.   #include <sys/file.h>
  20696. ! #endif BDS42
  20697.   #ifdef    SYS5DIR
  20698.   #include <sys/types.h>
  20699.   #include <sys/stat.h>
  20700. ! #endif    SYS5DIR
  20701.   
  20702.   extern int  errno;
  20703.       
  20704. --- 14,32 ----
  20705.   #include "../h/mh.h"
  20706.   #include <stdio.h>
  20707.   
  20708. ! #if defined (BSD42) || defined (hpux) || defined(SVR4) || \
  20709. !     defined(ncr) || defined (_AIX) || defined(AUX)
  20710.   #include <errno.h>
  20711.   #include <sys/param.h>
  20712.   #include <sys/file.h>
  20713. ! #endif /* BSD42 ... */
  20714.   #ifdef    SYS5DIR
  20715.   #include <sys/types.h>
  20716.   #include <sys/stat.h>
  20717. ! #endif    /* SYS5DIR */
  20718. ! #if defined(SVR4) || defined(ncr)
  20719. ! #include <unistd.h>
  20720. ! #endif
  20721.   
  20722.   extern int  errno;
  20723.       
  20724. ***************
  20725. *** 34,40 ****
  20726.   #if defined (BSD42)  || defined (hpux) || defined (SYS5DIR)
  20727.       register char  *c;
  20728.       char path[MAXPATHLEN];
  20729. ! #endif BSD42
  20730.   
  20731.       m_update ();
  20732.       (void) fflush (stdout);
  20733. --- 38,44 ----
  20734.   #if defined (BSD42)  || defined (hpux) || defined (SYS5DIR)
  20735.       register char  *c;
  20736.       char path[MAXPATHLEN];
  20737. ! #endif    /* BSD42 */
  20738.   
  20739.       m_update ();
  20740.       (void) fflush (stdout);
  20741. ***************
  20742. *** 64,70 ****
  20743.           }
  20744.       }
  20745.       else
  20746. ! #endif    BSD42 or hpux or SYS5DIR
  20747.       switch (pid = vfork ()) {
  20748.       case NOTOK: 
  20749.           advise ("fork", "unable to");
  20750. --- 68,74 ----
  20751.           }
  20752.       }
  20753.       else
  20754. ! #endif    /* BSD42 or hpux or SYS5DIR */
  20755.       switch (pid = vfork ()) {
  20756.       case NOTOK: 
  20757.           advise ("fork", "unable to");
  20758. *** ../mh-6.7.2/sbr/path.c    Tue Feb  6 13:09:03 1990
  20759. --- sbr/path.c    Mon Dec 14 16:20:41 1992
  20760. ***************
  20761. *** 1,4 ****
  20762. --- 1,7 ----
  20763.   /* path.c - return a pathname */
  20764. + #ifndef    lint
  20765. + static char ident[] = "@(#)$Id: path.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  20766. + #endif    /* lint */
  20767.   
  20768.   #include "../h/mh.h"
  20769.   #include <stdio.h>
  20770. ***************
  20771. *** 27,33 ****
  20772.       if ((cp = expath (name, flag))
  20773.           && (ep = cp + strlen (cp) - 1) > cp
  20774.           && *ep == '/')
  20775. !     *ep = NULL;
  20776.   
  20777.       return cp;
  20778.   }
  20779. --- 30,36 ----
  20780.       if ((cp = expath (name, flag))
  20781.           && (ep = cp + strlen (cp) - 1) > cp
  20782.           && *ep == '/')
  20783. !     *ep = 0;
  20784.   
  20785.       return cp;
  20786.   }
  20787. ***************
  20788. *** 107,115 ****
  20789.       for (cp = f; *cp;)
  20790.       if (*cp == '/') {
  20791.           switch (*++cp) {
  20792. !         case NULL: 
  20793.               if (--cp > f)
  20794. !             *cp = NULL;
  20795.               break;
  20796.   
  20797.           case '/': 
  20798. --- 110,118 ----
  20799.       for (cp = f; *cp;)
  20800.       if (*cp == '/') {
  20801.           switch (*++cp) {
  20802. !         case 0: 
  20803.               if (--cp > f)
  20804. !             *cp = 0;
  20805.               break;
  20806.   
  20807.           case '/': 
  20808. ***************
  20809. *** 122,128 ****
  20810.               if (strcmp (cp, DOT) == 0) {
  20811.               if (cp > f + 1)
  20812.                   cp--;
  20813. !             *cp = NULL;
  20814.               break;
  20815.               }
  20816.               if (strcmp (cp, DOTDOT) == 0) {
  20817. --- 125,131 ----
  20818.               if (strcmp (cp, DOT) == 0) {
  20819.               if (cp > f + 1)
  20820.                   cp--;
  20821. !             *cp = 0;
  20822.               break;
  20823.               }
  20824.               if (strcmp (cp, DOTDOT) == 0) {
  20825. ***************
  20826. *** 131,137 ****
  20827.                   break;
  20828.               if (cp <= f)
  20829.                   cp = f + 1;
  20830. !             *cp = NULL;
  20831.               break;
  20832.               }
  20833.               if (strncmp (cp, PWD, NPWD) == 0) {
  20834. --- 134,140 ----
  20835.                   break;
  20836.               if (cp <= f)
  20837.                   cp = f + 1;
  20838. !             *cp = 0;
  20839.               break;
  20840.               }
  20841.               if (strncmp (cp, PWD, NPWD) == 0) {
  20842. *** ../mh-6.7.2/sbr/pidstatus.c    Thu Oct 29 15:00:46 1987
  20843. --- sbr/pidstatus.c    Mon Dec 14 16:20:42 1992
  20844. ***************
  20845. *** 1,4 ****
  20846. --- 1,7 ----
  20847.   /* pidstatus.c - report child's status */
  20848. + #ifndef    lint
  20849. + static char ident[] = "@(#)$Id: pidstatus.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  20850. + #endif    /* lint */
  20851.   
  20852.   #include "../h/mh.h"
  20853.   #include <signal.h>
  20854. ***************
  20855. *** 41,47 ****
  20856.   };
  20857.   #else
  20858.   extern  char *sys_siglist[];
  20859. ! #endif    BSD42
  20860.   
  20861.   /*   */
  20862.   
  20863. --- 44,50 ----
  20864.   };
  20865.   #else
  20866.   extern  char *sys_siglist[];
  20867. ! #endif    /* BSD42 */
  20868.   
  20869.   /*   */
  20870.   
  20871. ***************
  20872. *** 75,86 ****
  20873.           fprintf (fp, "Signal %d", signum);
  20874.           else
  20875.           fprintf (fp, "%s", sigs[signum]);
  20876. ! #else    BSD42
  20877.           if (signum >= NSIG)
  20878.           fprintf (fp, "Signal %d", signum);
  20879.           else
  20880.           fprintf (fp, "%s", sys_siglist[signum]);
  20881. ! #endif    BSD42
  20882.           fprintf (fp, "%s\n", status & 0x80 ? " (core dumped)" : "");
  20883.           break;
  20884.       }
  20885. --- 78,89 ----
  20886.           fprintf (fp, "Signal %d", signum);
  20887.           else
  20888.           fprintf (fp, "%s", sigs[signum]);
  20889. ! #else    /* BSD42 */
  20890.           if (signum >= NSIG)
  20891.           fprintf (fp, "Signal %d", signum);
  20892.           else
  20893.           fprintf (fp, "%s", sys_siglist[signum]);
  20894. ! #endif    /* BSD42 */
  20895.           fprintf (fp, "%s\n", status & 0x80 ? " (core dumped)" : "");
  20896.           break;
  20897.       }
  20898. *** ../mh-6.7.2/sbr/pidwait.c    Wed Jan 29 15:57:35 1992
  20899. --- sbr/pidwait.c    Mon Dec 14 16:20:42 1992
  20900. ***************
  20901. *** 1,14 ****
  20902.   /* pidwait.c - wait for child to exit */
  20903.   #ifndef    lint
  20904. ! static char ident[] = "@(#)$Id: pidwait.c,v 1.5 1992/01/29 23:57:28 jromine Exp $";
  20905. ! #endif    lint
  20906.   
  20907.   #include "../h/mh.h"
  20908.   #include <signal.h>
  20909.   #include <stdio.h>
  20910. ! #ifdef    BSD42
  20911.   #include <sys/wait.h>
  20912. ! #endif    BSD42
  20913.   
  20914.   
  20915.   int     pidwait (id, sigsok)
  20916. --- 1,14 ----
  20917.   /* pidwait.c - wait for child to exit */
  20918.   #ifndef    lint
  20919. ! static char ident[] = "@(#)$Id: pidwait.c,v 1.10 1992/12/15 00:20:22 jromine Exp $";
  20920. ! #endif    /* lint */
  20921.   
  20922.   #include "../h/mh.h"
  20923.   #include <signal.h>
  20924.   #include <stdio.h>
  20925. ! #if defined (BSD42) || defined (SVR4)
  20926.   #include <sys/wait.h>
  20927. ! #endif
  20928.   
  20929.   
  20930.   int     pidwait (id, sigsok)
  20931. ***************
  20932. *** 17,27 ****
  20933.   {
  20934.       register int    pid;
  20935.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20936. ! #ifndef    BSD42
  20937. !     int     status;
  20938. ! #else    BSD42
  20939.       union wait status;
  20940. ! #endif    BSD42
  20941.   
  20942.       if (sigsok == NOTOK) {
  20943.   #ifdef    notdef        /* I don't see why to trap these... */
  20944. --- 17,27 ----
  20945.   {
  20946.       register int    pid;
  20947.       TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  20948. ! #if    defined(BSD42) && !defined(WAITINT)
  20949.       union wait status;
  20950. ! #else
  20951. !     int     status;
  20952. ! #endif
  20953.   
  20954.       if (sigsok == NOTOK) {
  20955.   #ifdef    notdef        /* I don't see why to trap these... */
  20956. ***************
  20957. *** 32,39 ****
  20958. --- 32,43 ----
  20959.       qstat = signal (SIGQUIT, SIG_IGN);
  20960.       }
  20961.   
  20962. + #ifdef    SVR4
  20963. +     pid = waitpid (id, &status, WUNTRACED);
  20964. + #else
  20965.       while ((pid = wait (&status)) != NOTOK && pid != id)
  20966.       continue;
  20967. + #endif
  20968.   
  20969.       if (sigsok == NOTOK) {
  20970.   #ifdef    notdef
  20971. ***************
  20972. *** 44,52 ****
  20973.       (void) signal (SIGQUIT, qstat);
  20974.       }
  20975.   
  20976. ! #ifndef    BSD42
  20977. !     return (pid == NOTOK ? NOTOK : status);
  20978. ! #else    BSD42
  20979.       return (pid == NOTOK ? NOTOK : status.w_status);
  20980. ! #endif    BSD42
  20981.   }
  20982. --- 48,56 ----
  20983.       (void) signal (SIGQUIT, qstat);
  20984.       }
  20985.   
  20986. ! #if defined(BSD42) && !defined(WAITINT)
  20987.       return (pid == NOTOK ? NOTOK : status.w_status);
  20988. ! #else
  20989. !     return (pid == NOTOK ? NOTOK : status);
  20990. ! #endif
  20991.   }
  20992. *** ../mh-6.7.2/sbr/push.c    Thu Oct 29 15:00:47 1987
  20993. --- sbr/push.c    Mon Dec 14 16:20:43 1992
  20994. ***************
  20995. *** 1,4 ****
  20996. --- 1,7 ----
  20997.   /* push.c - push a fork into the background */
  20998. + #ifndef    lint
  20999. + static char ident[] = "@(#)$Id: push.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  21000. + #endif    /* lint */
  21001.   
  21002.   #include "../h/mh.h"
  21003.   #include <stdio.h>
  21004. ***************
  21005. *** 23,29 ****
  21006.           (void) signal (SIGTSTP, SIG_IGN);
  21007.           (void) signal (SIGTTIN, SIG_IGN);
  21008.           (void) signal (SIGTTOU, SIG_IGN);
  21009. ! #endif    SIGTSTP
  21010.           (void) freopen ("/dev/null", "r", stdin);
  21011.           (void) freopen ("/dev/null", "w", stdout);
  21012.           break;
  21013. --- 26,32 ----
  21014.           (void) signal (SIGTSTP, SIG_IGN);
  21015.           (void) signal (SIGTTIN, SIG_IGN);
  21016.           (void) signal (SIGTTOU, SIG_IGN);
  21017. ! #endif    /* SIGTSTP */
  21018.           (void) freopen ("/dev/null", "r", stdin);
  21019.           (void) freopen ("/dev/null", "w", stdout);
  21020.           break;
  21021. *** ../mh-6.7.2/sbr/putenv.c    Tue Feb  6 13:08:42 1990
  21022. --- sbr/putenv.c    Mon Dec 14 16:20:43 1992
  21023. ***************
  21024. *** 1,4 ****
  21025. --- 1,7 ----
  21026.   /* putenv.c - (un) set an envariable */
  21027. + #ifndef    lint
  21028. + static char ident[] = "@(#)$Id: putenv.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  21029. + #endif    /* lint */
  21030.   
  21031.   #include "../h/mh.h"
  21032.   #include <stdio.h>
  21033. ***************
  21034. *** 8,14 ****
  21035.   
  21036.   static nvmatch();
  21037.   
  21038. ! int     putenv (name, value)
  21039.   register char  *name,
  21040.                  *value;
  21041.   {
  21042. --- 11,17 ----
  21043.   
  21044.   static nvmatch();
  21045.   
  21046. ! int     m_putenv (name, value)
  21047.   register char  *name,
  21048.                  *value;
  21049.   {
  21050. *** ../mh-6.7.2/sbr/pwd.c    Mon Feb  5 14:38:32 1990
  21051. --- sbr/pwd.c    Mon Dec 14 16:20:44 1992
  21052. ***************
  21053. *** 1,9 ****
  21054.   /* pwd.c - return the current working directory */
  21055.   
  21056.   #include "../h/mh.h"
  21057.   #if    !defined (BSD42) && !defined (SYS5DIR)
  21058.   #include "../h/local.h"
  21059. ! #endif    not BSD42 and not SYS5DIR
  21060.   #include <stdio.h>
  21061.   
  21062.   #define    MAXPATHLEN    1024
  21063. --- 1,12 ----
  21064.   /* pwd.c - return the current working directory */
  21065. + #ifndef    lint
  21066. + static char ident[] = "@(#)$Id: pwd.c,v 2.5 1992/12/15 00:20:22 jromine Exp $";
  21067. + #endif    /* lint */
  21068.   
  21069.   #include "../h/mh.h"
  21070.   #if    !defined (BSD42) && !defined (SYS5DIR)
  21071.   #include "../h/local.h"
  21072. ! #endif    /* not BSD42 and not SYS5DIR */
  21073.   #include <stdio.h>
  21074.   
  21075.   #define    MAXPATHLEN    1024
  21076. ***************
  21077. *** 19,34 ****
  21078.   #ifndef    SYS5DIR
  21079.       if (getwd (curwd) == NOTOK) {
  21080.       admonish (NULL, "unable to determine working directory");
  21081. ! #else    SYS5DIR
  21082.       if (getcwd (curwd, MAXPATHLEN) == NULL) {
  21083.       admonish (NULL, "unable to determine working directory");
  21084. ! #endif    SYS5DIR
  21085. ! #else    BSD42
  21086. !     if (getwd (curwd) == NULL) {
  21087.       admonish (NULLCP, "unable to determine working directory: %s", curwd);
  21088. ! #endif    BSD42
  21089.       if (mypath == NULL
  21090. !         || *mypath == NULL
  21091.           || ((void) strcpy (curwd, mypath), chdir (curwd)) == NOTOK) {
  21092.           (void) strcpy (curwd, "/");
  21093.           (void) chdir (curwd);
  21094. --- 22,37 ----
  21095.   #ifndef    SYS5DIR
  21096.       if (getwd (curwd) == NOTOK) {
  21097.       admonish (NULL, "unable to determine working directory");
  21098. ! #else    /* SYS5DIR */
  21099.       if (getcwd (curwd, MAXPATHLEN) == NULL) {
  21100.       admonish (NULL, "unable to determine working directory");
  21101. ! #endif    /* SYS5DIR */
  21102. ! #else    /* BSD42 */
  21103. !     if (getwd (curwd) == 0) {
  21104.       admonish (NULLCP, "unable to determine working directory: %s", curwd);
  21105. ! #endif    /* BSD42 */
  21106.       if (mypath == NULL
  21107. !         || *mypath == 0
  21108.           || ((void) strcpy (curwd, mypath), chdir (curwd)) == NOTOK) {
  21109.           (void) strcpy (curwd, "/");
  21110.           (void) chdir (curwd);
  21111. ***************
  21112. *** 37,43 ****
  21113.       }
  21114.   
  21115.       if ((cp = curwd + strlen (curwd) - 1) > curwd && *cp == '/')
  21116. !     *cp = NULL;
  21117.   
  21118.       return curwd;
  21119.   }
  21120. --- 40,46 ----
  21121.       }
  21122.   
  21123.       if ((cp = curwd + strlen (curwd) - 1) > curwd && *cp == '/')
  21124. !     *cp = 0;
  21125.   
  21126.       return curwd;
  21127.   }
  21128. ***************
  21129. *** 120,123 ****
  21130.       closedir (dd);
  21131.       return NOTOK;
  21132.   }
  21133. ! #endif    not BSD42 and not SYS5DIR
  21134. --- 123,126 ----
  21135.       closedir (dd);
  21136.       return NOTOK;
  21137.   }
  21138. ! #endif    /* not BSD42 and not SYS5DIR */
  21139. *** ../mh-6.7.2/sbr/refile.c    Thu Oct 29 15:00:49 1987
  21140. --- sbr/refile.c    Mon Dec 14 16:20:44 1992
  21141. ***************
  21142. *** 1,6 ****
  21143.   /* refile.c - refile the draft into another folder */
  21144.   
  21145.   #include "../h/mh.h"
  21146.   #include <stdio.h>
  21147.   
  21148. --- 1,8 ----
  21149.   /* refile.c - refile the draft into another folder */
  21150. + #ifndef    lint
  21151. + static char ident[] = "@(#)$Id: refile.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
  21152. + #endif    /* lint */
  21153.   
  21154.   #include "../h/mh.h"
  21155.   #include <stdio.h>
  21156.   
  21157. ***************
  21158. *** 14,19 ****
  21159. --- 16,23 ----
  21160.   
  21161.       vecp = 0;
  21162.       vec[vecp++] = r1bindex (fileproc, '/');
  21163. +     vec[vecp++] = "-nolink";    /* override bad .mh_profile defaults */
  21164. +     vec[vecp++] = "-nopreserve";
  21165.       vec[vecp++] = "-file";
  21166.       vec[vecp++] = file;
  21167.   
  21168. *** ../mh-6.7.2/sbr/remdir.c    Mon Feb  5 14:39:43 1990
  21169. --- sbr/remdir.c    Mon Dec 14 16:20:45 1992
  21170. ***************
  21171. *** 1,4 ****
  21172. --- 1,7 ----
  21173.   /* remdir.c - remove a directory */
  21174. + #ifndef    lint
  21175. + static char ident[] = "@(#)$Id: remdir.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
  21176. + #endif    lint
  21177.   
  21178.   #include "../h/mh.h"
  21179.   #include <stdio.h>
  21180. ***************
  21181. *** 9,15 ****
  21182.   {
  21183.   #if    !defined (BSD42) && !defined (SYS5DIR)
  21184.       int     pid;
  21185. ! #endif    not BSD42 and not SYS5DIR
  21186.   
  21187.       m_update ();
  21188.       (void) fflush (stdout);
  21189. --- 12,18 ----
  21190.   {
  21191.   #if    !defined (BSD42) && !defined (SYS5DIR)
  21192.       int     pid;
  21193. ! #endif    /* not BSD42 and not SYS5DIR */
  21194.   
  21195.       m_update ();
  21196.       (void) fflush (stdout);
  21197. ***************
  21198. *** 32,43 ****
  21199.           return 0;
  21200.           break;
  21201.       }
  21202. ! #else    BSD42 or SYS5DIR
  21203.       if (rmdir (dir) == NOTOK) {
  21204.       admonish (dir, "unable to remove directory");
  21205.       return 0;
  21206.       }
  21207. ! #endif    BSD42 or SYS5DIR
  21208.   
  21209.       return 1;
  21210.   }
  21211. --- 35,46 ----
  21212.           return 0;
  21213.           break;
  21214.       }
  21215. ! #else    /* BSD42 or SYS5DIR */
  21216.       if (rmdir (dir) == NOTOK) {
  21217.       admonish (dir, "unable to remove directory");
  21218.       return 0;
  21219.       }
  21220. ! #endif    /* BSD42 or SYS5DIR */
  21221.   
  21222.       return 1;
  21223.   }
  21224. *** ../mh-6.7.2/sbr/smatch.c    Fri Feb  9 09:33:51 1990
  21225. --- sbr/smatch.c    Mon Dec 14 16:20:46 1992
  21226. ***************
  21227. *** 1,10 ****
  21228.   /* smatch.c - match a switch */
  21229.   
  21230.   #include "../h/mh.h"
  21231.   
  21232.   #define abs(i) (i < 0 ? -i : i)
  21233.   
  21234.   smatch(string, swp)
  21235.   register char *string;
  21236. --- 1,13 ----
  21237.   /* smatch.c - match a switch */
  21238. + #ifndef    lint
  21239. + static char ident[] = "@(#)$Id: smatch.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
  21240. + #endif    /* lint */
  21241.   
  21242.   #include "../h/mh.h"
  21243.   
  21244. ! #ifndef abs
  21245.   #define abs(i) (i < 0 ? -i : i)
  21246. ! #endif
  21247.   
  21248.   smatch(string, swp)
  21249.   register char *string;
  21250. *** ../mh-6.7.2/sbr/sprintb.c    Thu Oct 29 15:00:50 1987
  21251. --- sbr/sprintb.c    Mon Dec 14 16:20:46 1992
  21252. ***************
  21253. *** 1,4 ****
  21254. --- 1,7 ----
  21255.   /* sprintb.c - sprintf a %b string */
  21256. + #ifndef    lint
  21257. + static char ident[] = "@(#)$Id: sprintb.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  21258. + #endif    /* lint */
  21259.   
  21260.   #include "../h/mh.h"
  21261.   #include <stdio.h>
  21262. ***************
  21263. *** 31,37 ****
  21264.           for (; *bits > 32; bits++)
  21265.               continue;
  21266.       *bp++ = '>';
  21267. !     *bp = NULL;
  21268.       }
  21269.   
  21270.       return buffer;
  21271. --- 34,40 ----
  21272.           for (; *bits > 32; bits++)
  21273.               continue;
  21274.       *bp++ = '>';
  21275. !     *bp = 0;
  21276.       }
  21277.   
  21278.       return buffer;
  21279. *** ../mh-6.7.2/sbr/strindex.c    Thu Jan 23 15:13:41 1992
  21280. --- sbr/strindex.c    Mon Dec 14 16:20:47 1992
  21281. ***************
  21282. *** 1,7 ****
  21283.   /* strindex.c - "unsigned" lexical index */
  21284.   #ifndef    lint
  21285. ! static char ident[] = "@(#)$Id: strindex.c,v 2.2 1990/04/05 15:30:30 sources Exp $";
  21286. ! #endif    lint
  21287.   
  21288.   
  21289.   int  stringdex (p1, p2)
  21290. --- 1,7 ----
  21291.   /* strindex.c - "unsigned" lexical index */
  21292.   #ifndef    lint
  21293. ! static char ident[] = "@(#)$Id: strindex.c,v 2.3 1992/12/15 00:20:22 jromine Exp $";
  21294. ! #endif    /* lint */
  21295.   
  21296.   
  21297.   int  stringdex (p1, p2)
  21298. *** ../mh-6.7.2/sbr/trimcpy.c    Thu Oct 29 15:00:51 1987
  21299. --- sbr/trimcpy.c    Mon Dec 14 16:20:47 1992
  21300. ***************
  21301. *** 1,5 ****
  21302. --- 1,9 ----
  21303.   /* trimcpy.c - strip [lt]wsp and replace newlines with spaces */
  21304. + #ifndef       lint
  21305. + static char ident[] = "@(#)$Id: trimcpy.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  21306. + #endif    /*        lint */
  21307.   
  21308.   #include "../h/mh.h"
  21309.   #include <ctype.h>
  21310.   #include <stdio.h>
  21311. ***************
  21312. *** 14,20 ****
  21313.       cp++;
  21314.       for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
  21315.       if (isspace (*sp))
  21316. !         *sp = NULL;
  21317.       else
  21318.           break;
  21319.       for (sp = cp; *sp; sp++)
  21320. --- 18,24 ----
  21321.       cp++;
  21322.       for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
  21323.       if (isspace (*sp))
  21324. !         *sp = 0;
  21325.       else
  21326.           break;
  21327.       for (sp = cp; *sp; sp++)
  21328. *** ../mh-6.7.2/sbr/uleq.c    Mon Apr  2 15:07:21 1990
  21329. --- sbr/uleq.c    Mon Dec 14 16:20:48 1992
  21330. ***************
  21331. *** 1,4 ****
  21332. --- 1,7 ----
  21333.   /* uleq.c - "unsigned" lexical compare */
  21334. + #ifndef    lint
  21335. + static char ident[] = "@(#)$Id: uleq.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  21336. + #endif    /* lint */
  21337.   
  21338.   #define TO_LOWER 040
  21339.   #define NO_MASK  000
  21340. ***************
  21341. *** 18,25 ****
  21342. --- 21,36 ----
  21343.   
  21344.       while (c = *c1++)
  21345.       {
  21346. + #ifdef LOCALE
  21347. +     c &= 0xff;
  21348. +     mask = *c2 & 0xff;
  21349. +     c = (isalpha(c) && isupper(c)) ? tolower(c) : c;
  21350. +     mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask;
  21351. +     if (c != mask)
  21352. + #else
  21353.       mask = (isalpha(c) && isalpha(*c2)) ?  TO_LOWER : NO_MASK;
  21354.       if ((c | mask) != (*c2 | mask))
  21355. + #endif
  21356.           return 0;
  21357.       else
  21358.           c2++;
  21359. *** ../mh-6.7.2/sbr/uprf.c    Mon Apr  2 15:07:24 1990
  21360. --- sbr/uprf.c    Mon Dec 14 16:20:48 1992
  21361. ***************
  21362. *** 1,4 ****
  21363. --- 1,7 ----
  21364.   /* uprf.c - "unsigned" lexical prefix  */
  21365. + #ifndef    lint
  21366. + static char ident[] = "@(#)$Id: uprf.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  21367. + #endif    /* lint */
  21368.   
  21369.   #define TO_LOWER 040
  21370.   #define NO_MASK  000
  21371. ***************
  21372. *** 16,23 ****
  21373. --- 19,34 ----
  21374.   
  21375.       while (c = *c2++)
  21376.       {
  21377. + #ifdef LOCALE
  21378. +     c &= 0xff;
  21379. +     mask = *c1 & 0xff;
  21380. +     c = (isalpha(c) && isupper(c)) ? tolower(c) : c;
  21381. +     mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask;
  21382. +     if (c != mask)
  21383. + #else
  21384.       mask = (isalpha(c) && isalpha(*c1)) ?  TO_LOWER : NO_MASK;
  21385.       if ((c | mask) != (*c1 | mask))
  21386. + #endif
  21387.           return 0;
  21388.       else
  21389.           c1++;
  21390. *** ../mh-6.7.2/sbr/vfgets.c    Thu Oct 29 15:00:53 1987
  21391. --- sbr/vfgets.c    Mon Dec 14 16:20:49 1992
  21392. ***************
  21393. *** 1,4 ****
  21394. --- 1,7 ----
  21395.   /* vfgets.c - virtual fgets */
  21396. + #ifndef       lint
  21397. + static char ident[] = "@(#)$Id: vfgets.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  21398. + #endif    /*        lint */
  21399.   
  21400.   #include "../h/mh.h"
  21401.   #include <stdio.h>
  21402. ***************
  21403. *** 52,58 ****
  21404.           if (toggle)
  21405.           goto wrong_guess;
  21406.           if (*++dp == '\n')
  21407. !         *--dp = NULL, cp = dp;
  21408.           else
  21409.           cp = ++dp;
  21410.       }
  21411. --- 55,61 ----
  21412.           if (toggle)
  21413.           goto wrong_guess;
  21414.           if (*++dp == '\n')
  21415. !         *--dp = 0, cp = dp;
  21416.           else
  21417.           cp = ++dp;
  21418.       }
  21419. *** ../mh-6.7.2/support/bboards/bbaka.c    Tue Mar 20 16:23:49 1990
  21420. --- support/bboards/bbaka.c    Mon Dec 14 16:20:50 1992
  21421. ***************
  21422. *** 1,4 ****
  21423. --- 1,7 ----
  21424.   /* bbaka.c - generate an alias list for BBoards */
  21425. + #ifndef    lint
  21426. + static char ident[] = "@(#)$Id: bbaka.c,v 2.4 1992/12/15 00:20:22 jromine Exp $";
  21427. + #endif    lint
  21428.   
  21429.   #include "../h/strings.h"
  21430.   #include "../zotnet/bboards.h"
  21431. ***************
  21432. *** 49,57 ****
  21433.       if (systemn) {
  21434.   #ifndef    MHMTS
  21435.       (void) sprintf (bbaddr, "%s@bboards", bb -> bb_name, LocalName ());
  21436. ! #else    MHMTS
  21437.       (void) strcpy (bbaddr, BBOARDS);
  21438. ! #endif    MHMTS
  21439.   
  21440.       if (strcmp (bb -> bb_name, bb -> bb_addr) == 0)
  21441.           aka (bb -> bb_name, bbaddr);
  21442. --- 52,60 ----
  21443.       if (systemn) {
  21444.   #ifndef    MHMTS
  21445.       (void) sprintf (bbaddr, "%s@bboards", bb -> bb_name, LocalName ());
  21446. ! #else    /* MHMTS */
  21447.       (void) strcpy (bbaddr, BBOARDS);
  21448. ! #endif    /* MHMTS */
  21449.   
  21450.       if (strcmp (bb -> bb_name, bb -> bb_addr) == 0)
  21451.           aka (bb -> bb_name, bbaddr);
  21452. ***************
  21453. *** 113,119 ****
  21454.   {
  21455.   #ifndef    MHMTS
  21456.       printf ("%s: %s\n", field, value);
  21457. ! #else    MHMTS
  21458.       printf ("%s%s %s\n", field, systemn ? ":" : ";", value);
  21459. ! #endif    MHMTS
  21460.   }
  21461. --- 116,122 ----
  21462.   {
  21463.   #ifndef    MHMTS
  21464.       printf ("%s: %s\n", field, value);
  21465. ! #else    /* MHMTS */
  21466.       printf ("%s%s %s\n", field, systemn ? ":" : ";", value);
  21467. ! #endif    /* MHMTS */
  21468.   }
  21469. *** ../mh-6.7.2/support/bboards/bbexp.c    Tue Mar 20 16:25:11 1990
  21470. --- support/bboards/bbexp.c    Mon Dec 14 16:20:50 1992
  21471. ***************
  21472. *** 1,4 ****
  21473. --- 1,7 ----
  21474.   /* bbexp.c - expunge the BBoards area */
  21475. + #ifndef    lint
  21476. + static char ident[] = "@(#)$Id: bbexp.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  21477. + #endif    /* lint */
  21478.   
  21479.   #include "../h/mh.h"
  21480.   #include "../h/dropsbr.h"
  21481. ***************
  21482. *** 21,27 ****
  21483. --- 24,34 ----
  21484.   int    pipeser ();
  21485.   
  21486.   
  21487. + #ifndef    __STDC__
  21488. + #ifdef    SYS5
  21489.   struct passwd *getpwnam ();
  21490. + #endif
  21491. + #endif
  21492.   
  21493.   /*   */
  21494.   
  21495. ***************
  21496. *** 137,143 ****
  21497.       fprintf (pf, "packf all -file %s\n", tmpfil);
  21498.   #ifdef    notdef            /* want real EOF to end it */
  21499.       fprintf (pf, "quit\n");
  21500. ! #endif    notdef
  21501.       if (td = pclose (pf))
  21502.       advise (NULLCP, "msh returns %d", td);
  21503.       (void) signal (SIGPIPE, SIG_DFL);
  21504. --- 144,150 ----
  21505.       fprintf (pf, "packf all -file %s\n", tmpfil);
  21506.   #ifdef    notdef            /* want real EOF to end it */
  21507.       fprintf (pf, "quit\n");
  21508. ! #endif    /* notdef */
  21509.       if (td = pclose (pf))
  21510.       advise (NULLCP, "msh returns %d", td);
  21511.       (void) signal (SIGPIPE, SIG_DFL);
  21512. ***************
  21513. *** 225,231 ****
  21514.   {
  21515.   #ifndef    BSD42
  21516.       (void) signal (SIGPIPE, pipeser);
  21517. ! #endif    not BSD42
  21518.   
  21519.       if (!broken_pipe++)
  21520.       advise (NULLCP, "broken pipe");
  21521. --- 232,238 ----
  21522.   {
  21523.   #ifndef    BSD42
  21524.       (void) signal (SIGPIPE, pipeser);
  21525. ! #endif    /* not BSD42 */
  21526.   
  21527.       if (!broken_pipe++)
  21528.       advise (NULLCP, "broken pipe");
  21529. *** ../mh-6.7.2/support/bboards/bbtar.c    Tue Mar 20 16:25:36 1990
  21530. --- support/bboards/bbtar.c    Mon Dec 14 16:20:51 1992
  21531. ***************
  21532. *** 1,4 ****
  21533. --- 1,7 ----
  21534.   /* bbtar.c - generate the names of archive files to be put to tape */
  21535. + #ifndef    lint
  21536. + static char ident[] = "@(#)$Id: bbtar.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
  21537. + #endif    /* lint */
  21538.   
  21539.   /* Usage:
  21540.   
  21541. ***************
  21542. *** 27,33 ****
  21543. --- 30,40 ----
  21544.   
  21545.   static    process();
  21546.   
  21547. + #ifndef    __STDC__
  21548. + #ifdef    SYS5
  21549.   struct passwd  *getpwnam ();
  21550. + #endif
  21551. + #endif
  21552.   
  21553.   /*   */
  21554.   
  21555. *** /dev/null    Tue Dec 15 08:01:10 1992
  21556. --- support/general/bootmhn.findit    Mon Nov  2 13:59:33 1992
  21557. ***************
  21558. *** 0 ****
  21559. --- 1,26 ----
  21560. + : run this script through /bin/sh
  21561. + : '$Id: bootmhn.findit,v 1.2 1992/11/02 21:58:59 jromine Exp $'
  21562. + if [ -z "$1" -o -z "$2" ]; then
  21563. +     echo "usage: bootmhn.findit program library" 1>&2
  21564. +     exit 1
  21565. + fi
  21566. + PGM= DIR= oIFS="$IFS" IFS=":"
  21567. + for A in $PATH $2 /usr/demo/SOUND; do
  21568. +     if [ "$A" = "." ]; then
  21569. +     continue
  21570. +     fi
  21571. +     if [ -f "$A/$1" ]; then
  21572. +     if [ "$A" = "/usr/local/bin" ]; then
  21573. +         PGM="$1" DIR=""
  21574. +     else
  21575. +         PGM="$A/$1" DIR="$A/"
  21576. +     fi
  21577. +     echo "$PGM"
  21578. +     exit 0
  21579. +     fi
  21580. + done
  21581. + IFS="$oIFS"
  21582. *** /dev/null    Tue Dec 15 08:01:10 1992
  21583. --- support/general/bootmhn.sh    Mon Nov 16 14:32:51 1992
  21584. ***************
  21585. *** 0 ****
  21586. --- 1,150 ----
  21587. + : run this script through /bin/sh
  21588. + : '$Id'
  21589. + if [ -z "$1" ]; then
  21590. +     echo "usage: bootmhn.sh MH-library-area" 1>&2
  21591. +     exit 1
  21592. + fi
  21593. + LIB="$1"
  21594. + MHN="$LIB/mhn_defaults"
  21595. + if [ -s $MHN ]; then
  21596. +     echo "%s: already exists." 1>&2
  21597. +     exit 1
  21598. + fi
  21599. + TMP=/tmp/mhn$$
  21600. + trap "rm -f $TMP" 0 1 2 3 13 15
  21601. + echo "mhn-store-text: %m%P.txt" >> $TMP
  21602. + echo "mhn-store-application/PostScript: %m%P.ps" >> $TMP
  21603. + PGM="`./bootmhn.findit xwud $LIB`"
  21604. + if [ ! -z "$PGM" ]; then
  21605. +     XWUD="$PGM" X11DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
  21606. + else
  21607. +     XWUD= X11DIR=
  21608. + fi
  21609. + PGM="`./bootmhn.findit pbmtoxwd $LIB`"
  21610. + if [ ! -z "$PGM" ]; then
  21611. +     PBM="$PGM" PBMDIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
  21612. + else
  21613. +     PBM= PBMDIR=
  21614. + fi
  21615. + PGM="`./bootmhn.findit xv $LIB`"
  21616. + if [ ! -z "$PGM" ]; then
  21617. +     echo "\
  21618. + mhn-show-image: %p$PGM -geometry =-0+0 '%f'" >> $TMP
  21619. + elif [ ! -z $"PBM" -a ! -z "$XWUD" ]; then
  21620. +     echo "\
  21621. + mhn-show-image/gif: %p${PBMDIR}giftoppm | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
  21622. + mhn-show-image/x-pbm: %p${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
  21623. + mhn-show-image/x-pgm: %p${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
  21624. + mhn-show-image/x-ppm: %p${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
  21625. + mhn-show-image/x-xwd: %p$XWUD -geometry =-0+0" >> $TMP
  21626. +     PGM="`./bootmhn.findit djpeg $LIB`"
  21627. +     if [ ! -z "$PGM" ]; then
  21628. +     echo "\
  21629. + mhn-show-image/jpeg: %p$PGM -Pg | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
  21630. +     fi
  21631. + fi
  21632. + if [ -f "/dev/audioIU" ]; then
  21633. +     PGM="`./bootmhn.findit recorder $LIB`"
  21634. +     if [ ! -z "$PGM" ]; then
  21635. +     echo "\
  21636. + mhn-store-audio/basic: %m%P.au
  21637. + mhn-compose-audio/basic: ${AUDIODIR}recorder '%f' -au -pause > /dev/tty
  21638. + mhn-show-audio/basic: %p${AUDIODIR}splayer -au" >> $TMP
  21639. +     fi
  21640. + elif [ -f "/dev/audio" ]; then
  21641. +     PGM="`./bootmhn.findit raw2audio $LIB`"
  21642. +     if [ ! -z "$PGM" ]; then
  21643. +     AUDIODIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
  21644. +     echo "\
  21645. + mhn-store-audio/basic: | ${AUDIODIR}raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
  21646. + mhn-store-audio/x-next: %m%P.au" >> $TMP
  21647. +     echo "\
  21648. + mhn-compose-audio/basic: ${AUDIODIR}record | ${AUDIODIR}raw2audio -F
  21649. + mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | play" >> $TMP
  21650. +     PGM="`./bootmhn.findit adpcm_enc $LIB`"
  21651. +     if [ ! -z "$PGM" ]; then
  21652. +         DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
  21653. +         echo "\
  21654. + mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc
  21655. + mhn-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
  21656. +     else
  21657. +         echo "\
  21658. + mhn-compose-audio/x-next: ${AUDIODIR}record
  21659. + mhn-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
  21660. +     fi
  21661. +     else
  21662. +     echo "\
  21663. + mhn-compose-audio/basic: cat < /dev/audio
  21664. + mhn-show-audio/basic: %pcat > /dev/audio" >> $TMP
  21665. +     fi
  21666. + fi
  21667. + PGM="`./bootmhn.findit lpr $LIB`"
  21668. + if [ ! -z "$PGM" ]; then
  21669. +     echo "\
  21670. + mhn-show-application/PostScript: %plpr -Pps" >> $TMP    
  21671. + else
  21672. +     PGM="`./bootmhn.findit lp $LIB`"
  21673. +     if [ ! -z "$PGM" ]; then    
  21674. +     echo "\
  21675. + mhn-show-application/PostScript: %plp -dps" >> $TMP    
  21676. +     fi
  21677. + fi
  21678. + PGM="`./bootmhn.findit ivs_replay $LIB`"
  21679. + if [ ! -z "$PGM" ]; then
  21680. +     echo "\
  21681. + mhn-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP
  21682. + fi
  21683. + PGM="`./bootmhn.findit richtext $LIB`"
  21684. + if [ ! -z "$PGM" ]; then
  21685. +     echo "\
  21686. + mhn-show-text/richtext: %p$PGM -p '%F'" >> $TMP
  21687. + else
  21688. +     PGM="`./bootmhn.findit rt2raw $LIB`"
  21689. +     if [ ! -z "$PGM" ]; then
  21690. +     echo "\
  21691. + mhn-show-text/richtext: %p$PGM < '%f' | fmt -78 | more" >> $TMP
  21692. +     fi
  21693. + fi
  21694. + PGM="`./bootmhn.findit xterm $LIB`"
  21695. + if [ ! -z "$PGM" ]; then
  21696. +     echo "\
  21697. + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s" >> $TMP
  21698. + fi
  21699. + sort < $TMP > $MHN
  21700. + chmod 644 $MHN
  21701. + exit 0
  21702. + : not until we get a "safe" postscript environment...
  21703. + PGM="`./bootmhn.findit pageview $LIB`"
  21704. + if [ "$DISPLAY" = "unix:0.0" -a ! -z "$PGM" ]; then
  21705. +     echo "mhn-show-application/PostScript: %p$PGM -" >> $TMP    
  21706. + else
  21707. +     PGM="`./bootmhn.findit gs $LIB`"
  21708. +     if [ ! -z "$PGM" ]; then
  21709. +     echo "mhn-show-application/PostScript: %p$PGM -- '%F'" >> $TMP
  21710. +     fi
  21711. + fi
  21712. + : have to experiment more with this
  21713. + PGM="`./bootmhn.findit ivs_record $LIB`"
  21714. + if [ ! -z "$PGM" ]; then
  21715. +     echo "\
  21716. + mhn-compose-application/x-ivs: $PGM -u localhost '%F'" >> $TMP
  21717. + fi
  21718. *** /dev/null    Tue Dec 15 08:01:10 1992
  21719. --- support/general/mhl.headers    Tue Oct 20 15:48:44 1992
  21720. ***************
  21721. *** 0 ****
  21722. --- 1,12 ----
  21723. + overflowtext="***",overflowoffset=5
  21724. + leftadjust,compwidth=9
  21725. + ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-ID
  21726. + Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
  21727. + To:
  21728. + cc:
  21729. + :
  21730. + From:
  21731. + Subject:
  21732. + :
  21733. + extras:nocomponent
  21734. + :
  21735. *** /dev/null    Tue Dec 15 08:01:10 1992
  21736. --- support/general/packmbox.sh    Fri Feb 14 09:05:43 1992
  21737. ***************
  21738. *** 0 ****
  21739. --- 1,40 ----
  21740. + #! /bin/sh
  21741. + # packmbox - pack an MH folder back into a UUCP-style mbox
  21742. + # @(#)$Id: packmbox.sh,v 1.16 1992/02/14 17:05:31 jromine Exp $
  21743. + #
  21744. + # Defaults:
  21745. + #    `+folder'    defaults to current folder
  21746. + #    `msgs'     defaults to all
  21747. + #
  21748. + # Context:
  21749. + #    Current-Folder
  21750. + #
  21751. + # for simplicity (and speed) we don't parse command-line args (much)
  21752. + case $#/$1 in
  21753. +    1/-h*) echo "syntax: packmbox [+folder] [msgs] [-help]" 1>&2; exit 0;;
  21754. + esac
  21755. + format="%(msg) From \
  21756. + %<{return-path}%(putstr)%|\
  21757. + %<(nonnull(mbox{from}))%(putstr)%|nobody%>@\
  21758. + %<(nonnull(host{from}))%(putstr)%|nowhere%>%> \
  21759. + %(day{date}) %(month{date}) %2(mday{date}) \
  21760. + %02(hour{date}):%02(min{date}):%02(sec{date}) \
  21761. + %(void(year{date}))%<(gt 100)%4(putnum)%|19%02(putnum)%>"
  21762. + trap 'rm -f /tmp/packm$$; exit 1' 1 2 3 15
  21763. + scan -noclear -noheader -noreverse -width 256 \
  21764. +             -format "${format}" $* >/tmp/packm$$
  21765. + # tricky -- you must do this "cd" after scan has updated the context
  21766. + cd `mhpath`
  21767. + exec </tmp/packm$$
  21768. + rm -f /tmp/packm$$
  21769. + while read m f
  21770. + do
  21771. +     echo "$f"
  21772. +     sed -e '/^From /s/^/>/' < $m
  21773. +     echo ""
  21774. + done
  21775. + exit
  21776. *** ../mh-6.7.2/support/general/replcomps    Thu Apr  5 16:05:55 1990
  21777. --- support/general/replcomps    Sun Feb  9 14:03:19 1992
  21778. ***************
  21779. *** 1,2 ****
  21780. ! %(lit)%(formataddr %<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\
  21781.   %<(nonnull)%(void(width))%(putaddr To: )\n%>\
  21782. --- 1,2 ----
  21783. ! %(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
  21784.   %<(nonnull)%(void(width))%(putaddr To: )\n%>\
  21785. *** /dev/null    Tue Dec 15 08:01:10 1992
  21786. --- support/general/scan.default    Mon Feb 10 21:11:21 1992
  21787. ***************
  21788. *** 0 ****
  21789. --- 1,7 ----
  21790. + %; NOTE: This file is supplied for reference only; it shows the default
  21791. + %;    format string (for non-UK sites) which was compiled into "scan".
  21792. + %;    See the source file "h/scansbr.h" for details.
  21793. + %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  21794. + %02(mon{date})/%02(mday{date})%<{date} %|*%>\
  21795. + %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  21796. + %{subject}%<{body}<<%{body}>>%>
  21797. *** ../mh-6.7.2/support/general/scan.mailx    Mon Dec 10 11:55:18 1990
  21798. --- support/general/scan.mailx    Mon Oct 26 08:44:55 1992
  21799. ***************
  21800. *** 2,6 ****
  21801.   %<{status} %|N%>\
  21802. ! %<{replied}R%|%<{encrypted}E%| %>%>\
  21803.   %4(msg)\
  21804. !  %<(mymbox{from})To: %13(friendly{to})%|%17(friendly{from})%>\
  21805.    %3(day{date}) %3(month{date}) %02(mday{date})\
  21806. --- 2,6 ----
  21807.   %<{status} %|N%>\
  21808. ! %<{replied}R%?{encrypted}E%| %>\
  21809.   %4(msg)\
  21810. !  %<(mymbox{from})%<{to}To: %13(friendly{to})%>%>%<(zero)%17(friendly{from})%>\
  21811.    %3(day{date}) %3(month{date}) %02(mday{date})\
  21812. *** ../mh-6.7.2/support/general/scan.size    Mon Dec 10 11:55:18 1990
  21813. --- support/general/scan.size    Mon Oct 26 08:44:57 1992
  21814. ***************
  21815. *** 1,2 ****
  21816. ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
  21817.   %02(mon{date})/%02(mday{date})%<{date} %|*%>\
  21818. --- 1,2 ----
  21819. ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  21820.   %02(mon{date})/%02(mday{date})%<{date} %|*%>\
  21821. ***************
  21822. *** 3,5 ****
  21823.   %5(size) \
  21824. ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%>  \
  21825.   %{subject}%<{body}<<%{body}%>
  21826. --- 3,5 ----
  21827.   %5(size) \
  21828. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  21829.   %{subject}%<{body}<<%{body}%>
  21830. *** ../mh-6.7.2/support/general/scan.time    Mon Dec 10 11:55:18 1990
  21831. --- support/general/scan.time    Mon Oct 26 08:44:56 1992
  21832. ***************
  21833. *** 1,2 ****
  21834. ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
  21835.   %02(mon{date})/%02(mday{date}) \
  21836. --- 1,2 ----
  21837. ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  21838.   %02(mon{date})/%02(mday{date}) \
  21839. ***************
  21840. *** 4,6 ****
  21841.   %<{date} %|*%>\
  21842. ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%>  \
  21843.   %{subject}%<{body}<<%{body}%>
  21844. --- 4,6 ----
  21845.   %<{date} %|*%>\
  21846. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  21847.   %{subject}%<{body}<<%{body}%>
  21848. *** ../mh-6.7.2/support/general/scan.timely    Mon Dec 10 11:55:18 1990
  21849. --- support/general/scan.timely    Mon Oct 26 08:44:58 1992
  21850. ***************
  21851. *** 1,9 ****
  21852. ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
  21853.   %(void(rclock{date}))\
  21854. ! %<(gt 15768000)%03(month{date})%02(year{date})%|\
  21855. ! %<(gt 604800)%02(mday{date})%03(month{date})%|\
  21856. ! %<(gt 86400) %(day{date}) %|\
  21857. ! %02(hour{date}):%02(min{date})%>%>%>\
  21858.   %<{date} %|*%>\
  21859. ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%>  \
  21860.   %{subject}%<{body}<<%{body}%>
  21861. --- 1,9 ----
  21862. ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
  21863.   %(void(rclock{date}))\
  21864. ! %<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
  21865. ! %?(gt 604800)%02(mday{date})%03(month{date})\
  21866. ! %?(gt 86400) %(day{date}) %|\
  21867. ! %02(hour{date}):%02(min{date})%>\
  21868.   %<{date} %|*%>\
  21869. ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
  21870.   %{subject}%<{body}<<%{body}%>
  21871. *** /dev/null    Tue Dec 15 08:01:10 1992
  21872. --- support/general/viamail.sh    Fri Oct 16 10:15:06 1992
  21873. ***************
  21874. *** 0 ****
  21875. --- 1,34 ----
  21876. + : run this script through /bin/sh
  21877. + : '@(#)$Id: viamail.sh,v 1.2 1992/10/16 17:15:00 jromine Exp $'
  21878. + DELAY=0 FROM=
  21879. + case "$1" in
  21880. +     -*)    DELAY="`echo $1 | sed -e 's%-%%'`"
  21881. +     shift
  21882. +     ;;
  21883. + esac
  21884. + if [ ! -z "$PERSON" ]; then
  21885. +     FROM="-viafrom $PERSON"
  21886. + fi
  21887. + if [ $# -lt 3 ]; then
  21888. +     echo 'usage: viamail: "mailpath" "subject-string" directory-or-file ...' 1>&2
  21889. +     exit 1;
  21890. + fi
  21891. + mailpath="$1"
  21892. + echo "mailpath = $mailpath" 1>&2
  21893. + shift
  21894. + subject="$1"
  21895. + echo "subject-string = $subject" 1>&2
  21896. + shift
  21897. + echo "files = $*" 1>&2
  21898. + tar cvf - $* | compress | \
  21899. +     mhn -viamail "$mailpath" -viasubj "$subject" \
  21900. +     -viaparm "type=tar; conversions=x-compress" \
  21901. +     -viacmnt "extract with uncompress | tar xvpf -" \
  21902. +     -viadelay "$DELAY" \
  21903. +     -verbose $FROM
  21904. *** /dev/null    Tue Dec 15 08:01:10 1992
  21905. --- support/pop/pop-more.txt    Mon Oct 26 08:46:41 1992
  21906. ***************
  21907. *** 0 ****
  21908. --- 1,590 ----
  21909. +           draft       POP Version 3: More Service Offerings       Apr 92
  21910. +                          Post Office Protocol: Version 3
  21911. +                               More Service Offerings
  21912. +                              Fri Apr 17 21:03:20 1992
  21913. +                                  Marshall T. Rose
  21914. +                            Dover Beach Consulting, Inc.
  21915. +                               mrose@dbc.mtview.ca.us
  21916. +           1.  Status of this Memo
  21917. +           This memo provides information for the Internet community.  It
  21918. +           does not specify any standard.  Distribution of this memo is
  21919. +           unlimited.  Please send comments to the author.
  21920. +           2.  Abstract
  21921. +           This memo suggests some modest enhancements to version 3 of
  21922. +           the Post Office Protocol (RFC 1081).  All of these extensions
  21923. +           are optional.  In particular, administrators should examine
  21924. +           their environment to see if any of these enhancements are
  21925. +           useful.
  21926. +           M. Rose                                               [Page 1]
  21927. +           draft       POP Version 3: More Service Offerings       Apr 92
  21928. +           3.  Historical Overview
  21929. +           The Post Office Protocol (POP) was developed to provide a
  21930. +           simple mechanism for workstations to download their mailboxes
  21931. +           from workgroup and departmental servers.  Typically, the
  21932. +           workstations and servers are interconnected via a LAN or
  21933. +           perhaps an internet-mesh with reasonable throughput and
  21934. +           latency.
  21935. +           As use of the Internet suite of protocols has grown, different
  21936. +           kind of environments are beginning to use the POP.  This memo
  21937. +           suggests optional enhancements to the POP to allow it to
  21938. +           function better in these environments.
  21939. +           M. Rose                                               [Page 2]
  21940. +           draft       POP Version 3: More Service Offerings       Apr 92
  21941. +           4.  The APOP command
  21942. +           Each POP session starts with a USER/PASS exchange.  This
  21943. +           results in a POP-subscriber password being sent in the clear
  21944. +           on the network.  For intermittent use of POP, this may not
  21945. +           introduce a sizable risk.  However, many POP client
  21946. +           implementations connect to the POP server on a regular
  21947. +           basis -- to check for new mail.  Further the interval of
  21948. +           session initiation may be on the order of five minutes.
  21949. +           Hence, the risk of password capture is greatly enhanced.
  21950. +           A new method of authentication is required which provides for
  21951. +           both origin authentication and replay protection, but which
  21952. +           does not involve sending a password in the clear over the
  21953. +           network.  This memo introduces a new command, APOP, to provide
  21954. +           this functionality.
  21955. +           A POP server which implements the APOP command will include a
  21956. +           timestamp in its banner greeting.  The syntax of the timestamp
  21957. +           corresponds to the `msg-id' in RFC 822, and MUST be different
  21958. +           each time the POP server issues a banner greeting.  For
  21959. +           example, on a UNIX implementation in which a separate UNIX
  21960. +           process is used for each instance of a POP server, the syntax
  21961. +           of the timestamp might be:
  21962. +                <process-ID.clock@hostname>
  21963. +           where `process-ID' is the decimal value of the process's PID,
  21964. +           clock is the decimal value of the system clock, and hostname
  21965. +           is the fully-qualified domain-name corresponding to the host
  21966. +           where the POP server is running.
  21967. +           The POP client makes note of this timestamp, and then issues
  21968. +           the APOP command.  The syntax of this command is:
  21969. +                APOP name digest
  21970. +           The `name' parameter is a locally-significant string which
  21971. +           identifies a particular POP-subscriber.  The `digest'
  21972. +           parameter is calculated by applying the MD5 algorithm[1] to a
  21973. +           string consisting of the timestamp (including angle-brackets)
  21974. +           followed by a shared secret.  This shared secret is a string
  21975. +           known only to the POP client and POP server.  Great care
  21976. +           should be taken to prevent unauthorized disclosure of the
  21977. +           secret, as knowledge of the secret will allow any entity to
  21978. +           M. Rose                                               [Page 3]
  21979. +           draft       POP Version 3: More Service Offerings       Apr 92
  21980. +           successfully masquerade as the named POP-subscriber.  The
  21981. +           `digest' parameter itself is a 16-octet value which is sent in
  21982. +           hexadecimal format.
  21983. +           When the POP server receives the APOP command, it verifies the
  21984. +           digest provided.  If the digest is correct, the POP server
  21985. +           issues a positive response, and the POP session enters the
  21986. +           TRANSACTION state.  Otherwise, a negative response is issued
  21987. +           and the POP session remains in the AUTHORIZATION state.
  21988. +           4.1.  Usage Example
  21989. +                S: +OK POP server ready <1896.697170952@dbc.mtview.ca.us>
  21990. +                C: USER mrose
  21991. +                S: +OK password required for mrose
  21992. +                C: APOP c4c9334bac560ecc979e58001b3e22fb
  21993. +                S: +OK maildrop has 1 message (369 octets)
  21994. +           In this example, the shared secret is the string `tanstaaf'.
  21995. +           Hence, the MD5 algorithm is applied to the string
  21996. +                <1896.697170952@dbc.mtview.ca.us>tanstaaf
  21997. +           which produces a digest value of
  21998. +                c4c9334bac560ecc979e58001b3e22fb
  21999. +           M. Rose                                               [Page 4]
  22000. +           draft       POP Version 3: More Service Offerings       Apr 92
  22001. +           5.  The XTND SCAN command
  22002. +           The current POP model works best when network latency and
  22003. +           throughput is on the order provided by most LANs.  However,
  22004. +           when POP is used over low-speed connections (e.g., 2400 baud
  22005. +           dialup lines), the POP does not work well.
  22006. +           Historically, the POP model has been to make only minimal
  22007. +           requirements on the POP server.  In order to more effectively
  22008. +           operate over low-speed connections, this model must be
  22009. +           modified somewhat.  Implementation experience shows that the
  22010. +           largest improvement can be achieved by making one shift:
  22011. +           having the POP server generate a scan listing for the POP
  22012. +           client.  This memo introduces a new command, XTND SCAN, to
  22013. +           provide this functionality.
  22014. +           A POP client issues the XTND SCAN command during the
  22015. +           TRANSACTION state.  The syntax of this command is:
  22016. +                XTND SCAN width [format]
  22017. +           The `width' parameter is the maximum length for a scan
  22018. +           listing.  The optional `format' parameter is a quoted-string
  22019. +           with the semantics of an mh-format(5) string[2].  If the
  22020. +           `format' parameter is not given, the POP server uses a
  22021. +           locally-defined default value.  Note that the resulting format
  22022. +           string must not contain CR or LF.
  22023. +           The `format' parameter is the only token in the POP which must
  22024. +           be enclosed in double-quotation marks.  Within the string, two
  22025. +           special sequences are recognized:
  22026. +                \"  - double-quote
  22027. +                \\ - single-\
  22028. +           Otherwise, each character is used verbatim.  Note that this
  22029. +           string can be quite long (on the order of 400 characters).
  22030. +           When the POP server receives the XTND SCAN command and if it
  22031. +           implements it, it issues a positive response.  Otherwise a
  22032. +           negative response is issued.  Thereafter, whenever the POP
  22033. +           client issues a LIST command, the syntax of the resulting
  22034. +           `scan listing' is of the form:
  22035. +                msgno size #string
  22036. +           M. Rose                                               [Page 5]
  22037. +           draft       POP Version 3: More Service Offerings       Apr 92
  22038. +           As with the standard POP, the `msgno' field gives the message
  22039. +           number and the `size' field gives the size of the message in
  22040. +           octets.  The `string' parameter, which immediately follows the
  22041. +           `#' character is the string calculated when the formatting
  22042. +           string is applied to the message.  Note that the `string' may
  22043. +           not be multiline.
  22044. +           5.1.  Usage Example
  22045. +                S: XTND SCAN 80 "%4(msg)%<(cur)+%| %>%<{replied}-%|...
  22046. +                C: +OK SCAN
  22047. +                S: LIST 1
  22048. +                C: +OK 1 369 #   1  02/03 17:49PST To:mrose           test<<
  22049. +           M. Rose                                               [Page 6]
  22050. +           draft       POP Version 3: More Service Offerings       Apr 92
  22051. +           6.  Implementations
  22052. +           MH 6.7.4 implements the POP extensions described in this memo.
  22053. +           Contact Bug-MH@ics.uci.edu for information on how to get MH.
  22054. +           M. Rose                                               [Page 7]
  22055. +           draft       POP Version 3: More Service Offerings       Apr 92
  22056. +           7.  Acknowledgements
  22057. +           The author gratefully acknowledges the comments of Alfred
  22058. +           Grimstad and Neil Ostroff of Bellcore, and Keith McCloghrie of
  22059. +           Hughes LAN Systems.
  22060. +           M. Rose                                               [Page 8]
  22061. +           draft       POP Version 3: More Service Offerings       Apr 92
  22062. +           8.  References
  22063. +           [1]  R.L. Rivest, The MD5 Message-Digest Algorithm.  Request
  22064. +                for Comments 1321, (April, 1992).
  22065. +           [2]  M.T. Rose, J.L. Romine, The Rand MH Message Handling
  22066. +                System: User's Manual, November, 1985.
  22067. +           M. Rose                                               [Page 9]
  22068. +           draft       POP Version 3: More Service Offerings       Apr 92
  22069. +           Table of Contents
  22070. +           1 Status of this Memo ...................................    1
  22071. +           2 Abstract ..............................................    1
  22072. +           3 Historical Overview ...................................    2
  22073. +           4 The APOP command ......................................    3
  22074. +           4.1 Usage Example .......................................    4
  22075. +           5 The XTND SCAN command .................................    5
  22076. +           5.1 Usage Example .......................................    6
  22077. +           6 Implementations .......................................    7
  22078. +           7 Acknowledgements ......................................    8
  22079. +           8 References ............................................    9
  22080. +           M. Rose                                              [Page 10]
  22081. *** ../mh-6.7.2/support/pop/popaka.c    Thu Apr  5 16:02:52 1990
  22082. --- support/pop/popaka.c    Mon Dec 14 16:20:52 1992
  22083. ***************
  22084. *** 1,7 ****
  22085.   /* popaka.c - generate POP entries for MMDF-II alias file */
  22086.   #ifndef    lint
  22087. ! static char ident[] = "@(#)$Id: popaka.c,v 1.4 90/04/05 15:34:58 sources Exp $";
  22088. ! #endif    lint
  22089.   
  22090.   #include <stdio.h>
  22091.   #include "../zotnet/bboards.h"
  22092. --- 1,7 ----
  22093.   /* popaka.c - generate POP entries for MMDF-II alias file */
  22094.   #ifndef    lint
  22095. ! static char ident[] = "@(#)$Id: popaka.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
  22096. ! #endif    /* lint */
  22097.   
  22098.   #include <stdio.h>
  22099.   #include "../zotnet/bboards.h"
  22100. *** /dev/null    Tue Dec 15 08:01:10 1992
  22101. --- support/pop/popauth.c    Mon Dec 14 16:20:52 1992
  22102. ***************
  22103. *** 0 ****
  22104. --- 1,251 ----
  22105. + /* popauth.c - manipulate POP authorization DB */
  22106. + #ifndef    lint
  22107. + static char ident[] = "@(#)$Id: popauth.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  22108. + #endif    /* lint */
  22109. + #include "../h/mh.h"
  22110. + #include "popauth.h"
  22111. + #undef    DBM        /* used by mts.c and ndbm.h */
  22112. + #include <ndbm.h>
  22113. + #include <pwd.h>
  22114. + #include <stdio.h>
  22115. + #include <sys/types.h>
  22116. + #include <sys/stat.h>
  22117. + #include <sys/file.h>
  22118. + #ifdef    SYS5
  22119. + #include <fcntl.h>
  22120. + #endif
  22121. + #include "../zotnet/bboards.h"
  22122. + #include "../zotnet/mts.h"
  22123. + /*   */
  22124. + static struct swit switches[] = {
  22125. + #define    INITSW    0
  22126. +     "init", 0,
  22127. + #define    LISTSW    1
  22128. +     "list", 0,
  22129. + #define    USERSW    2
  22130. +     "user name", 0,
  22131. + #define    HELPSW    3
  22132. +     "help", 4,
  22133. +     NULL, 0
  22134. + };
  22135. + /*   */
  22136. + char   *getpass ();
  22137. + /*   */
  22138. + /* ARGSUSED */
  22139. + main (argc, argv)
  22140. + int    argc;
  22141. + char   *argv[];
  22142. + {
  22143. +     int        flags,
  22144. +         i,
  22145. +         initsw = 0,
  22146. +         insist,
  22147. +         listsw = 0;
  22148. +     long    clock;
  22149. +     char   *bp,
  22150. +        *cp,
  22151. +        *usersw = NULL,
  22152. +         buf[100],
  22153. +       **ap,
  22154. +       **argp,
  22155. +        *arguments[MAXARGS];
  22156. +     datum   key,
  22157. +         value;
  22158. +     DBM    *db;
  22159. +     struct authinfo auth;
  22160. +     invo_name = r1bindex (argv[0], '/');
  22161. +     m_foil (NULLCP);
  22162. +     if ((cp = m_find (invo_name)) != NULL) {
  22163. +     ap = brkstring (cp = getcpy (cp), " ", "\n");
  22164. +     ap = copyip (ap, arguments);
  22165. +     }
  22166. +     else
  22167. +     ap = arguments;
  22168. +     (void) copyip (argv + 1, ap);
  22169. +     argp = arguments;
  22170. + /*   */
  22171. +     while (cp = *argp++) {
  22172. +     if (*cp == '-')
  22173. +         switch (smatch (++cp, switches)) {
  22174. +         case AMBIGSW: 
  22175. +             ambigsw (cp, switches);
  22176. +             done (1);
  22177. +         case UNKWNSW: 
  22178. +             adios (NULLCP, "-%s unknown", cp);
  22179. +         case HELPSW: 
  22180. +             (void) sprintf (buf, "%s [switches]", invo_name);
  22181. +             help (buf, switches);
  22182. +             done (1);
  22183. +         case INITSW:
  22184. +             initsw = 1, listsw = 0;
  22185. +             continue;
  22186. +         case LISTSW:
  22187. +             listsw = 1, initsw = 0;
  22188. +             continue;
  22189. +         case USERSW:
  22190. +             if (!(usersw = *argp++) || *usersw == '-')
  22191. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  22192. +             continue;
  22193. +         }
  22194. +     adios (NULLCP, "usage: %s [switches]", invo_name);
  22195. +     }
  22196. + /*   */
  22197. + #ifndef    APOP
  22198. +     adios (NULLCP, "not compiled with APOP option");
  22199. + #else
  22200. +     if (getuid ())
  22201. +     initsw = listsw = 0, usersw = NULL;
  22202. +     if (initsw) {
  22203. +     struct passwd *pw;
  22204. +     struct stat st;
  22205. +     if ((pw = getpwnam (POPUID)) == NULL)
  22206. +         adios (NULLCP, "POP user-id unknown");
  22207. +     (void) sprintf (buf, "%s.dir", APOP);
  22208. +     if (stat (buf, &st) != NOTOK) {
  22209. +         if (!getanswer ("Really initialize POP authorization DB? "))
  22210. +         done (1);
  22211. +         (void) unlink (buf);
  22212. +         (void) sprintf (buf, "%s.pag", APOP);        
  22213. +         (void) unlink (buf);
  22214. +     }
  22215. +     if ((db = dbm_open (APOP, O_RDWR | O_CREAT, 0600)) == NULL)
  22216. +         adios (APOP, "unable to create POP authorization DB");
  22217. +     if (fchown (dbm_dirfno (db), pw -> pw_uid, pw -> pw_gid) == NOTOK
  22218. +             || fchown (dbm_pagfno (db), pw -> pw_uid, pw -> pw_gid)
  22219. +                 == NOTOK)
  22220. +         advise (" ", "error setting ownership of POP authorization DB");
  22221. +     done (0);
  22222. +     }
  22223. +     if ((db = dbm_open (APOP, O_RDONLY, 0)) == NULL)
  22224. +     adios (APOP, "unable to open POP authorization DB");
  22225. +     if (flock (dbm_pagfno (db), LOCK_SH) == NOTOK)
  22226. +     adios (APOP, "unable to lock POP authorization DB");
  22227. +     if (listsw) {
  22228. +     if (usersw) {
  22229. +         key.dsize = strlen (key.dptr = usersw) + 1;
  22230. +         value = dbm_fetch (db, key);
  22231. +         if (value.dptr == NULL)
  22232. +         adios (NULLCP, "no such entry in POP authorization DB");
  22233. +         bcopy (value.dptr, (char *) &auth, sizeof auth);
  22234. +         printf ("%s\n", key.dptr);
  22235. +     }
  22236. +     else
  22237. +         for (key = dbm_firstkey (db); key.dptr; key = dbm_nextkey (db)) {
  22238. +         printf ("%s", key.dptr);
  22239. +         value = dbm_fetch (db, key);
  22240. +         if (value.dptr == NULL)
  22241. +             printf (" - no information?!?\n");
  22242. +         else {
  22243. +             bcopy (value.dptr, (char *) &auth, sizeof auth);
  22244. +             printf ("\n");
  22245. +         }
  22246. +         }
  22247. +     dbm_close (db);
  22248. +     done (0);
  22249. +     }
  22250. +     if (usersw == NULL)
  22251. +     usersw = getusr ();
  22252. +     fprintf (stderr, "Changing POP password for %s.\n", usersw);
  22253. +     key.dsize = strlen (key.dptr = usersw) + 1;
  22254. +     value = dbm_fetch (db, key);
  22255. +     if (value.dptr != NULL) {
  22256. +     bcopy (value.dptr, (char *) &auth, sizeof auth);
  22257. +     dbm_close (db);
  22258. +     if ((i = strlen (strcpy (buf, getpass ("Old password:")))) == 0
  22259. +             || auth.auth_secretlen != i
  22260. +             || bcmp (buf, auth.auth_secret, i))
  22261. +         fprintf (stderr, "Sorry.\n"), exit (1);
  22262. +     }
  22263. +     else
  22264. +     dbm_close (db);
  22265. + #ifdef    lint
  22266. +     flags = 0;
  22267. + #endif    /* lint */
  22268. +     for (insist = 0; insist < 2; insist++) {
  22269. +     int    i;
  22270. +     char    c;
  22271. +     if (insist)
  22272. +         printf ("Please use %s.\n",
  22273. +             flags == 1 ? "at least one non-numeric character"
  22274. +             : "a longer password");
  22275. +     if ((i = strlen (strcpy (buf, getpass ("New password:")))) == 0) {
  22276. +         fprintf (stderr, "Password unchanged.\n");
  22277. +         exit (1);
  22278. +     }
  22279. +     flags = 0;
  22280. +     for (cp = buf; c = *cp++;)
  22281. +         if (c >= 'a' && c <= 'z')
  22282. +         flags |= 2;
  22283. +         else
  22284. +         if (c >= 'A' && c <= 'Z')
  22285. +             flags |= 4;
  22286. +         else
  22287. +             if (c >= '0' && c <= '9')
  22288. +             flags |= 1;
  22289. +             else
  22290. +             flags |= 8;
  22291. +     if ((flags >= 7 && i >= 4)
  22292. +         || ((flags == 2 || flags == 4) && i >= 6)
  22293. +         || ((flags == 3 || flags == 5 || flags == 6) && i >= 5))
  22294. +         break;
  22295. +     }
  22296. +     if (strcmp (buf, getpass ("Retype new password:"))) {
  22297. +     fprintf (stderr, "Mismatch - password unchanged.\n");
  22298. +     exit (1);
  22299. +     }
  22300. +     if ((db = dbm_open (APOP, O_RDWR, 0)) == NULL)
  22301. +     adios (APOP, "unable to open POP authorization DB");
  22302. +     if (flock (dbm_pagfno (db), LOCK_EX) == NOTOK)
  22303. +     adios (APOP, "unable to lock POP authorization DB");
  22304. +     key.dsize = strlen (key.dptr = usersw) + 1;
  22305. +     buf[sizeof auth.auth_secret] = NULL;
  22306. +     bcopy (buf, auth.auth_secret, auth.auth_secretlen = strlen (buf));
  22307. +     value.dptr = (char *) &auth, value.dsize = sizeof auth;
  22308. +     if (dbm_store (db, key, value, DBM_REPLACE))
  22309. +     adios (NULLCP, "POP authorization DB may be corrupt?!?");
  22310. +     dbm_close (db);
  22311. + #endif
  22312. +     done (0);
  22313. +     /* NOTREACHED */
  22314. + }
  22315. *** /dev/null    Tue Dec 15 08:01:10 1992
  22316. --- support/pop/popauth.h    Tue Feb 11 09:41:40 1992
  22317. ***************
  22318. *** 0 ****
  22319. --- 1,8 ----
  22320. + /* popauth.h - POP authorization DB definitions */
  22321. + /* @(#)$Id: popauth.h,v 1.1 1992/02/11 17:41:39 jromine Exp $ */
  22322. + struct authinfo {
  22323. +     char    auth_secret[16];
  22324. +     int        auth_secretlen;
  22325. + };
  22326. *** ../mh-6.7.2/support/pop/popd.c    Mon Apr  9 09:45:16 1990
  22327. --- support/pop/popd.c    Mon Dec 14 16:20:53 1992
  22328. ***************
  22329. *** 1,7 ****
  22330.   /* popd.c - the POP server */
  22331.   #ifndef    lint
  22332. ! static char ident[] = "@(#)$Id: popd.c,v 1.8 90/04/09 09:45:09 sources Exp Locker: sources $";
  22333. ! #endif    lint
  22334.   
  22335.   /* Author:    Marshall T. Rose    <MRose@UDel>    (MTR)
  22336.           Department of Computer Science and Information Sciences
  22337. --- 1,7 ----
  22338.   /* popd.c - the POP server */
  22339.   #ifndef    lint
  22340. ! static char ident[] = "@(#)$Id: popd.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
  22341. ! #endif    /* lint */
  22342.   
  22343.   /* Author:    Marshall T. Rose    <MRose@UDel>    (MTR)
  22344.           Department of Computer Science and Information Sciences
  22345. ***************
  22346. *** 21,44 ****
  22347.   #include <sys/file.h>
  22348.   #ifndef    NOIOCTLH
  22349.   #include <sys/ioctl.h>
  22350. ! #endif    NOIOCTLH
  22351.   #include <sys/socket.h>
  22352.   #include <sys/time.h>
  22353.   #ifdef    SIGTSTP
  22354.   #include <sys/resource.h>
  22355.   #include <sys/wait.h>
  22356. ! #endif    SIGTSTP
  22357.   #include <netinet/in.h>
  22358.   #include <netdb.h>
  22359.   #include <arpa/inet.h>
  22360.   #ifdef    SYS5
  22361.   #include <fcntl.h>
  22362. ! #endif    SYS5
  22363.   
  22364.   
  22365.   #ifdef    SYS5
  22366.   #define    u_short    ushort
  22367. ! #endif    SYS5
  22368.   
  22369.   #define    NOTOK    (-1)
  22370.   #define    OK    0
  22371. --- 21,51 ----
  22372.   #include <sys/file.h>
  22373.   #ifndef    NOIOCTLH
  22374.   #include <sys/ioctl.h>
  22375. ! #endif
  22376.   #include <sys/socket.h>
  22377.   #include <sys/time.h>
  22378.   #ifdef    SIGTSTP
  22379.   #include <sys/resource.h>
  22380.   #include <sys/wait.h>
  22381. ! #endif
  22382.   #include <netinet/in.h>
  22383.   #include <netdb.h>
  22384.   #include <arpa/inet.h>
  22385. + #ifdef KPOP
  22386. + #include <krb.h>
  22387. + static Key_schedule schedule;
  22388. + static KTEXT_ST ticket;
  22389. + static AUTH_DAT kdata;
  22390. + #endif
  22391.   #ifdef    SYS5
  22392.   #include <fcntl.h>
  22393. ! #endif
  22394.   
  22395.   
  22396.   #ifdef    SYS5
  22397.   #define    u_short    ushort
  22398. ! #endif
  22399.   
  22400.   #define    NOTOK    (-1)
  22401.   #define    OK    0
  22402. ***************
  22403. *** 72,77 ****
  22404. --- 79,87 ----
  22405.   static struct sockaddr_in   in_socket;
  22406.   static struct sockaddr_in  *isock = &in_socket;
  22407.   
  22408. + #ifdef KPOP
  22409. + static AUTH_DAT kdata;
  22410. + #endif
  22411.   
  22412.   static int    chldser ();
  22413.   void    padios (), padvise ();
  22414. ***************
  22415. *** 86,91 ****
  22416. --- 96,104 ----
  22417.   char  **argv,
  22418.         **envp;
  22419.   {
  22420. + #ifdef KPOP
  22421. +     int     i;
  22422. + #else
  22423.       int     fd,
  22424.               sd;
  22425.       int        on = 1;
  22426. ***************
  22427. *** 92,110 ****
  22428. --- 105,135 ----
  22429.       struct servent *sp;
  22430.       struct sockaddr_in  out_socket,
  22431.                          *osock = &out_socket;
  22432. + #endif
  22433.   
  22434. + #ifdef KPOP
  22435. +     i = sizeof(in_socket);
  22436. +     if (getpeername(0, &in_socket, &i) < 0)
  22437. +       padios("getpeername", "bad status");
  22438. + #else
  22439.       if ((sp = getservbyname (myservice, myprotocol)) == NULL)
  22440.       padios (NULLCP, "%s/%s: unknown service", myprotocol, myservice);
  22441.       isock -> sin_family = AF_INET;
  22442.       isock -> sin_port = sp -> s_port;
  22443.       isock -> sin_addr.s_addr = INADDR_ANY;
  22444. + #endif
  22445.       arginit (argv);
  22446.       envinit ();
  22447.   
  22448. + #ifndef KPOP
  22449.   #ifdef    RESTART
  22450.       for (;;) {
  22451.       char    reason[BUFSIZ];
  22452. + #if defined(BSD42) && !defined(WAITINT)
  22453.       union wait status;
  22454. + #else
  22455. +     int status;
  22456. + #endif
  22457.   
  22458.       switch (fork ()) {
  22459.           case NOTOK: 
  22460. ***************
  22461. *** 137,147 ****
  22462.       closelog ();
  22463.   #ifndef    BSD43
  22464.       openlog (myname, LOG_PID);
  22465. ! #else    BSD43
  22466.       openlog (myname, LOG_PID, LOG_DAEMON);
  22467. ! #endif    BSD43
  22468.       padvise (NULLCP, LOG_INFO, "restart");
  22469. ! #endif    RESTART
  22470.   
  22471.   /*   */
  22472.   
  22473. --- 162,172 ----
  22474.       closelog ();
  22475.   #ifndef    BSD43
  22476.       openlog (myname, LOG_PID);
  22477. ! #else    /* BSD43 */
  22478.       openlog (myname, LOG_PID, LOG_DAEMON);
  22479. ! #endif    /* BSD43 */
  22480.       padvise (NULLCP, LOG_INFO, "restart");
  22481. ! #endif    /* RESTART */
  22482.   
  22483.   /*   */
  22484.   
  22485. ***************
  22486. *** 153,175 ****
  22487.           padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
  22488.       if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, NULL, 0) == NOTOK)
  22489.       padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
  22490. ! #else    BSD43
  22491.       if (options & SO_DEBUG)
  22492.       if (setsockopt (sd, SOL_SOCKET, SO_DEBUG, &on, sizeof on) == NOTOK)
  22493.           padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
  22494.       if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof on) == NOTOK)
  22495.       padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
  22496. ! #endif    BSD43
  22497.       if (bind (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
  22498.       padios ("socket", "unable to bind");
  22499.   
  22500.   #ifdef    SIGCHLD
  22501.       (void) signal (SIGCHLD, chldser);
  22502. ! #endif    SIGCHLD
  22503.       (void) listen (sd, SOMAXCONN);
  22504.   #ifdef    FAST
  22505.       popinit ();
  22506. ! #endif    FAST
  22507.       for (;;) {
  22508.       int     i = sizeof *osock;
  22509.   
  22510. --- 178,202 ----
  22511.           padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
  22512.       if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, NULL, 0) == NOTOK)
  22513.       padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
  22514. ! #else    /* BSD43 */
  22515.       if (options & SO_DEBUG)
  22516.       if (setsockopt (sd, SOL_SOCKET, SO_DEBUG, &on, sizeof on) == NOTOK)
  22517.           padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
  22518.       if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof on) == NOTOK)
  22519.       padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
  22520. ! #endif    /* BSD43 */
  22521.       if (bind (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
  22522.       padios ("socket", "unable to bind");
  22523.   
  22524.   #ifdef    SIGCHLD
  22525.       (void) signal (SIGCHLD, chldser);
  22526. ! #endif    /* SIGCHLD */
  22527.       (void) listen (sd, SOMAXCONN);
  22528. + #endif /* KPOP */
  22529.   #ifdef    FAST
  22530.       popinit ();
  22531. ! #endif    /* FAST */
  22532. ! #ifndef KPOP
  22533.       for (;;) {
  22534.       int     i = sizeof *osock;
  22535.   
  22536. ***************
  22537. *** 179,193 ****
  22538.               "unable to accept connection on");
  22539.           continue;
  22540.       }
  22541.   #ifdef    FAST
  22542.       popassert ();
  22543. ! #endif    FAST
  22544.       switch (fork ()) {
  22545.           case OK: 
  22546.           (void) close (sd);
  22547.   #ifdef    SIGCHLD
  22548.           (void) signal (SIGCHLD, SIG_DFL);
  22549. ! #endif    SIGCHLD
  22550.           server (fd, osock);
  22551.           _exit (0);
  22552.   
  22553. --- 206,222 ----
  22554.               "unable to accept connection on");
  22555.           continue;
  22556.       }
  22557. + #endif
  22558.   #ifdef    FAST
  22559.       popassert ();
  22560. ! #endif    /* FAST */
  22561. ! #ifndef KPOP
  22562.       switch (fork ()) {
  22563.           case OK: 
  22564.           (void) close (sd);
  22565.   #ifdef    SIGCHLD
  22566.           (void) signal (SIGCHLD, SIG_DFL);
  22567. ! #endif    /* SIGCHLD */
  22568.           server (fd, osock);
  22569.           _exit (0);
  22570.   
  22571. ***************
  22572. *** 198,203 ****
  22573. --- 227,235 ----
  22574.           (void) close (fd);
  22575.       }
  22576.       }
  22577. + #else
  22578. +     server (0, isock);
  22579. + #endif
  22580.   }
  22581.   
  22582.   /*   */
  22583. ***************
  22584. *** 209,233 ****
  22585.       u_short port;
  22586.       struct hostent *hp;
  22587.       struct in_addr *addr;
  22588.   
  22589.       closelog ();
  22590.   #ifndef    BSD43
  22591.       openlog (myname, LOG_PID);
  22592. ! #else    BSD43
  22593.       openlog (myname, LOG_PID, LOG_DAEMON);
  22594. ! #endif    BSD43
  22595.       port = ntohs (sin -> sin_port);
  22596.       addr = &sin -> sin_addr;
  22597.       hp = gethostbyaddr (addr, sizeof *addr, sin -> sin_family);
  22598.       padvise (NULLCP, LOG_INFO, "servicing %s/%d",
  22599.           hp ? hp -> h_name : inet_ntoa (*addr), port);
  22600. !     (void) dup2 (fd, 0);
  22601. !     (void) close (fd);
  22602.       (void) dup2 (0, 1);
  22603.   
  22604.       pop (0, 1, sin -> sin_family == AF_INET && port < IPPORT_RESERVED && hp,
  22605.           hp ? hp -> h_name : NULLCP);
  22606.   }
  22607.       
  22608.   /*   */
  22609. --- 241,296 ----
  22610.       u_short port;
  22611.       struct hostent *hp;
  22612.       struct in_addr *addr;
  22613. + #ifdef KPOP
  22614. +     int auth;
  22615. +     int sin_len;
  22616. +     struct sockaddr_in faddr;
  22617. +     char instance[INST_SZ];
  22618. +     char version[9];
  22619. +     char user[ANAME_SZ];
  22620. + #endif
  22621.   
  22622.       closelog ();
  22623.   #ifndef    BSD43
  22624.       openlog (myname, LOG_PID);
  22625. ! #else    /* BSD43 */
  22626.       openlog (myname, LOG_PID, LOG_DAEMON);
  22627. ! #endif    /* BSD43 */
  22628.       port = ntohs (sin -> sin_port);
  22629.       addr = &sin -> sin_addr;
  22630.       hp = gethostbyaddr (addr, sizeof *addr, sin -> sin_family);
  22631.       padvise (NULLCP, LOG_INFO, "servicing %s/%d",
  22632.           hp ? hp -> h_name : inet_ntoa (*addr), port);
  22633. !     if (fd != 0)
  22634. !       {
  22635. !     (void) dup2 (fd, 0);
  22636. !     (void) close (fd);
  22637. !       }
  22638.       (void) dup2 (0, 1);
  22639.   
  22640. + #ifdef KPOP
  22641. +     sin_len = sizeof (struct sockaddr_in);
  22642. +     if (getpeername(0, &faddr, &sin_len) < 0) {
  22643. +       padvise("getpeername", LOG_INFO, "");
  22644. +       exit(1);
  22645. +     }
  22646. +     strcpy(instance, "*");
  22647. +     auth = krb_recvauth(0L, 0, &ticket, "pop", instance,
  22648. +             &faddr, (struct sockaddr_in *)NULL,
  22649. +             &kdata, "", schedule, version);
  22650. +     if (auth == KSUCCESS)
  22651. +       auth = krb_kntoln(&kdata, user);
  22652. +     if (auth != KSUCCESS) {
  22653. +       padvise(NULLCP, LOG_INFO, "bad kerberos data, not ok'ing");
  22654. +       kpop (0, 1, NULLCP, NULLCP, auth); /* respond(NOTOK, krb_err_txt[auth]); */
  22655. +     } else {
  22656. +       kpop (0, 1, user, (hp ? hp -> h_name : NULLCP), 0);
  22657. +     }
  22658. + #else
  22659.       pop (0, 1, sin -> sin_family == AF_INET && port < IPPORT_RESERVED && hp,
  22660.           hp ? hp -> h_name : NULLCP);
  22661. + #endif
  22662.   }
  22663.       
  22664.   /*   */
  22665. ***************
  22666. *** 241,253 ****
  22667.   
  22668.       if (myname = rindex (*vec, '/'))
  22669.       myname++;
  22670. !     if (myname == NULL || *myname == NULL)
  22671.       myname = *vec;
  22672.   
  22673.       (void) gethostname (myhost, sizeof myhost);
  22674.       if (hp = gethostbyname (myhost))
  22675.       (void) strcpy (myhost, hp -> h_name);
  22676.       nbits = getdtablesize ();
  22677.   
  22678.       for (vec++; ap = *vec; vec++) {
  22679.       if (*ap == '-')
  22680. --- 304,320 ----
  22681.   
  22682.       if (myname = rindex (*vec, '/'))
  22683.       myname++;
  22684. !     if (myname == NULL || *myname == 0)
  22685.       myname = *vec;
  22686.   
  22687.       (void) gethostname (myhost, sizeof myhost);
  22688.       if (hp = gethostbyname (myhost))
  22689.       (void) strcpy (myhost, hp -> h_name);
  22690. + #ifndef BSD42
  22691. +     nbits = _NFILE;
  22692. + #else   /* BSD42 */
  22693.       nbits = getdtablesize ();
  22694. + #endif  /* BSD42 */
  22695.   
  22696.       for (vec++; ap = *vec; vec++) {
  22697.       if (*ap == '-')
  22698. ***************
  22699. *** 275,280 ****
  22700. --- 342,348 ----
  22701.   /*   */
  22702.   
  22703.   static  envinit () {
  22704. + #ifndef KPOP
  22705.       int     i,
  22706.               sd;
  22707.   
  22708. ***************
  22709. *** 306,312 ****
  22710.       if ((sd = open ("/dev/tty", O_RDWR)) != NOTOK) {
  22711.   #ifdef    TIOCNOTTY
  22712.           (void) ioctl (sd, TIOCNOTTY, NULLCP);
  22713. ! #endif    TIOCNOTTY
  22714.           (void) close (sd);
  22715.       }
  22716.       }
  22717. --- 374,380 ----
  22718.       if ((sd = open ("/dev/tty", O_RDWR)) != NOTOK) {
  22719.   #ifdef    TIOCNOTTY
  22720.           (void) ioctl (sd, TIOCNOTTY, NULLCP);
  22721. ! #endif    /* TIOCNOTTY */
  22722.           (void) close (sd);
  22723.       }
  22724.       }
  22725. ***************
  22726. *** 313,326 ****
  22727.   
  22728.       for (sd = 3; sd < nbits; sd++)
  22729.       (void) close (sd);
  22730.   
  22731.       (void) signal (SIGPIPE, SIG_IGN);
  22732.   
  22733.   #ifndef    BSD43
  22734.       openlog (myname, LOG_PID);
  22735. ! #else    BSD43
  22736.       openlog (myname, LOG_PID, LOG_DAEMON);
  22737. ! #endif    BSD43
  22738.       padvise (NULLCP, LOG_INFO, "starting");
  22739.       if (debug)
  22740.       padvise (NULLCP, LOG_DEBUG, "options=0x%x port=%d",
  22741. --- 381,395 ----
  22742.   
  22743.       for (sd = 3; sd < nbits; sd++)
  22744.       (void) close (sd);
  22745. + #endif /* KPOP */
  22746.   
  22747.       (void) signal (SIGPIPE, SIG_IGN);
  22748.   
  22749.   #ifndef    BSD43
  22750.       openlog (myname, LOG_PID);
  22751. ! #else    /* BSD43 */
  22752.       openlog (myname, LOG_PID, LOG_DAEMON);
  22753. ! #endif    /* BSD43 */
  22754.       padvise (NULLCP, LOG_INFO, "starting");
  22755.       if (debug)
  22756.       padvise (NULLCP, LOG_DEBUG, "options=0x%x port=%d",
  22757. ***************
  22758. *** 329,334 ****
  22759. --- 398,405 ----
  22760.   
  22761.   /*   */
  22762.   
  22763. + #ifndef KPOP
  22764.   /* ARGSUSED */
  22765.   
  22766.   #ifdef    SIGCHLD
  22767. ***************
  22768. *** 338,350 ****
  22769.   long    code;
  22770.   struct sigcontext *sc;
  22771.   {
  22772.       union wait status;
  22773.   
  22774.       while (wait3 (&status, WNOHANG, NULLRP) > 0)
  22775.       continue;
  22776.   }
  22777.   
  22778. ! #endif    SIGCHLD
  22779.   
  22780.   /*   */
  22781.   
  22782. --- 409,426 ----
  22783.   long    code;
  22784.   struct sigcontext *sc;
  22785.   {
  22786. + #if defined(BSD42) && !defined(WAITINT)
  22787. +     int status;
  22788. + #else
  22789.       union wait status;
  22790. + #endif
  22791.   
  22792.       while (wait3 (&status, WNOHANG, NULLRP) > 0)
  22793.       continue;
  22794.   }
  22795.   
  22796. ! #endif /* SIGCHLD */
  22797. ! #endif /* KPOP */
  22798.   
  22799.   /*   */
  22800.   
  22801. *** ../mh-6.7.2/support/pop/popser.c    Fri Nov 16 16:06:38 1990
  22802. --- support/pop/popser.c    Mon Dec 14 16:20:55 1992
  22803. ***************
  22804. *** 1,10 ****
  22805.   /* popser.c - the POP service */
  22806.   #ifndef    lint
  22807. ! static char ident[]="@(#)$Id: popser.c,v 1.16 90/11/16 14:56:38 mh Exp $";
  22808.   #endif
  22809.   
  22810.   #include "../h/mh.h"
  22811.   #include "../h/dropsbr.h"
  22812.   #include "../zotnet/bboards.h"
  22813.   #include <stdio.h>
  22814.   #include "../zotnet/mts.h"
  22815. --- 1,16 ----
  22816.   /* popser.c - the POP service */
  22817.   #ifndef    lint
  22818. ! static char ident[]="@(#)$Id: popser.c,v 1.29 1992/12/15 00:20:22 jromine Exp $";
  22819.   #endif
  22820.   
  22821.   #include "../h/mh.h"
  22822.   #include "../h/dropsbr.h"
  22823. + #ifdef    MPOP
  22824. + #ifdef    BPOP
  22825. + #include "../h/formatsbr.h"
  22826. + #include "../h/scansbr.h"
  22827. + #endif
  22828. + #endif /* MPOP */
  22829.   #include "../zotnet/bboards.h"
  22830.   #include <stdio.h>
  22831.   #include "../zotnet/mts.h"
  22832. ***************
  22833. *** 15,32 ****
  22834.   #include "syslog.h"
  22835.   #include <sys/types.h>
  22836.   #include <sys/stat.h>
  22837.   #ifdef    SYS5
  22838.   #include <fcntl.h>
  22839. ! #endif    SYS5
  22840.   #ifdef    SHADOW
  22841.   #include <shadow.h>
  22842. ! #endif    SHADOW
  22843.   
  22844.   
  22845.   #define    TRUE    1
  22846.   #define    FALSE    0
  22847.   
  22848. ! #define    NVEC    4
  22849.   
  22850.   #ifndef    POPSERVICE
  22851.   #define    POPSERVICE    "pop"
  22852. --- 21,41 ----
  22853.   #include "syslog.h"
  22854.   #include <sys/types.h>
  22855.   #include <sys/stat.h>
  22856. + #ifdef KPOP
  22857. + #include <krb.h>
  22858. + #endif    /* KPOP */
  22859.   #ifdef    SYS5
  22860.   #include <fcntl.h>
  22861. ! #endif    /* SYS5 */
  22862.   #ifdef    SHADOW
  22863.   #include <shadow.h>
  22864. ! #endif    /* SHADOW */
  22865.   
  22866.   
  22867.   #define    TRUE    1
  22868.   #define    FALSE    0
  22869.   
  22870. ! #define    NVEC    5
  22871.   
  22872.   #ifndef    POPSERVICE
  22873.   #define    POPSERVICE    "pop"
  22874. ***************
  22875. *** 54,73 ****
  22876.   static int     user (), pass ();
  22877.   #ifdef    BPOP
  22878.   static        isguest(), getbbmax();
  22879.   static    int    xtnd1(), xtnd2();
  22880. ! #endif    BPOP
  22881.   #ifdef    RPOP
  22882.   static int    rpop ();
  22883. ! #endif    RPOP
  22884.   static int     status (), list (), retrieve (), delete (), reset ();
  22885.   static int    top (), last ();
  22886.   #ifdef    BPOP
  22887. ! int    xtnd ();
  22888. ! #endif    BPOP
  22889.   static int     quit ();
  22890.   #ifdef    POP2
  22891.   static int    helo (), rdp2 (), acks (), ack2 (), fold (), nack ();
  22892. ! #endif    POP2
  22893.   
  22894.   static struct vector {
  22895.       char   *v_cmd;
  22896. --- 63,89 ----
  22897.   static int     user (), pass ();
  22898.   #ifdef    BPOP
  22899.   static        isguest(), getbbmax();
  22900. + #ifndef    MPOP
  22901.   static    int    xtnd1(), xtnd2();
  22902. ! #else
  22903. ! static    int    xtnd1(), xtnd2(), xtnd3 ();
  22904. ! #endif /* MPOP */
  22905. ! #endif    /* BPOP */
  22906.   #ifdef    RPOP
  22907.   static int    rpop ();
  22908. ! #endif    /* RPOP */
  22909. ! #ifdef    APOP
  22910. ! static    int    apop ();
  22911. ! #endif
  22912.   static int     status (), list (), retrieve (), delete (), reset ();
  22913.   static int    top (), last ();
  22914.   #ifdef    BPOP
  22915. ! static int    xtnd ();
  22916. ! #endif    /* BPOP */
  22917.   static int     quit ();
  22918.   #ifdef    POP2
  22919.   static int    helo (), rdp2 (), acks (), ack2 (), fold (), nack ();
  22920. ! #endif    /* POP2 */
  22921.   
  22922.   static struct vector {
  22923.       char   *v_cmd;
  22924. ***************
  22925. *** 80,86 ****
  22926.       "pass", 1, 1, pass, auth2, trans, auth1,
  22927.   #ifdef    RPOP
  22928.       "rpop", 1, 1, rpop, auth2, trans, auth1,
  22929. ! #endif    RPOP
  22930.       "quit", 0, 0, NULL, auth1, halt, halt,
  22931.       "quit", 0, 0, NULL, auth2, halt, halt,
  22932.   
  22933. --- 96,105 ----
  22934.       "pass", 1, 1, pass, auth2, trans, auth1,
  22935.   #ifdef    RPOP
  22936.       "rpop", 1, 1, rpop, auth2, trans, auth1,
  22937. ! #endif    /* RPOP */
  22938. ! #ifdef    APOP
  22939. !     "apop", 2, 2, apop, auth1, trans, auth1,
  22940. ! #endif
  22941.       "quit", 0, 0, NULL, auth1, halt, halt,
  22942.       "quit", 0, 0, NULL, auth2, halt, halt,
  22943.   
  22944. ***************
  22945. *** 94,101 ****
  22946.       "top",  2, 2, top,  trans, trans, trans,
  22947.       "last", 0, 0, last, trans, trans, trans,
  22948.   #ifdef    BPOP
  22949.       "xtnd", 1, 2, xtnd, trans, trans, trans,
  22950. ! #endif    BPOP
  22951.       "quit", 0, 0, quit, trans, halt, halt,
  22952.   
  22953.   #ifdef    POP2
  22954. --- 113,124 ----
  22955.       "top",  2, 2, top,  trans, trans, trans,
  22956.       "last", 0, 0, last, trans, trans, trans,
  22957.   #ifdef    BPOP
  22958. + #ifndef    MPOP
  22959.       "xtnd", 1, 2, xtnd, trans, trans, trans,
  22960. ! #else
  22961. !     "xtnd", 1, 3, xtnd, trans, trans, trans,
  22962. ! #endif /* MPOP */
  22963. ! #endif    /* BPOP */
  22964.       "quit", 0, 0, quit, trans, halt, halt,
  22965.   
  22966.   #ifdef    POP2
  22967. ***************
  22968. *** 115,121 ****
  22969.       "nack", 0, 0, rdp2, ack, item, error,
  22970.       "quit", 0, 0, NULL, ack, halt, halt,
  22971.   
  22972. ! #endif    POP2
  22973.       NULL
  22974.   };
  22975.   
  22976. --- 138,144 ----
  22977.       "nack", 0, 0, rdp2, ack, item, error,
  22978.       "quit", 0, 0, NULL, ack, halt, halt,
  22979.   
  22980. ! #endif    /* POP2 */
  22981.       NULL
  22982.   };
  22983.   
  22984. ***************
  22985. *** 125,139 ****
  22986.   
  22987.   #ifdef    POP2
  22988.   static int pop2 = NOTOK;    /* current pop2 msg, or NOTOK if pop3 */
  22989. ! #endif    POP2
  22990.   #ifdef    DPOP
  22991.   static int pop_uid;
  22992.   static int pop_gid;
  22993. ! #endif    DPOP
  22994.   
  22995.   static int  rproto;
  22996.   static char *hostname;
  22997.   static char server[BUFSIZ];
  22998.   
  22999.   static char username[BUFSIZ];
  23000.   
  23001. --- 148,163 ----
  23002.   
  23003.   #ifdef    POP2
  23004.   static int pop2 = NOTOK;    /* current pop2 msg, or NOTOK if pop3 */
  23005. ! #endif    /* POP2 */
  23006.   #ifdef    DPOP
  23007.   static int pop_uid;
  23008.   static int pop_gid;
  23009. ! #endif    /* DPOP */
  23010.   
  23011.   static int  rproto;
  23012.   static char *hostname;
  23013.   static char server[BUFSIZ];
  23014. + static char timestamp[BUFSIZ];
  23015.   
  23016.   static char username[BUFSIZ];
  23017.   
  23018. ***************
  23019. *** 156,163 ****
  23020.   
  23021.   static long BBtime = 0L;
  23022.   
  23023. ! struct bboard *getbbaux ();
  23024. ! #endif    BPOP
  23025.   
  23026.   
  23027.   struct Msg {            /* Msgs[0] contains info for entire maildrop */
  23028. --- 180,187 ----
  23029.   
  23030.   static long BBtime = 0L;
  23031.   
  23032. ! static struct bboard *getbbaux ();
  23033. ! #endif    /* BPOP */
  23034.   
  23035.   
  23036.   struct Msg {            /* Msgs[0] contains info for entire maildrop */
  23037. ***************
  23038. *** 179,184 ****
  23039. --- 203,214 ----
  23040.   
  23041.   static int  nmsgs;
  23042.   static int  dmsgs;
  23043. + #ifdef    MPOP
  23044. + #ifdef    BPOP
  23045. + static int   _sc_width = 0;
  23046. + static char *nfs = NULL;
  23047. + #endif
  23048. + #endif /* MPOP */
  23049.   
  23050.   
  23051.   #define    TRM    "."
  23052. ***************
  23053. *** 190,195 ****
  23054. --- 220,230 ----
  23055.   FILE   *input;
  23056.   FILE   *output;
  23057.   
  23058. + #ifndef    __STDC__
  23059. + #ifdef    SYS5
  23060. + struct passwd *getpwnam();
  23061. + #endif
  23062. + #endif
  23063.   
  23064.   void    padvise (), padios ();
  23065.   long    lseek ();
  23066. ***************
  23067. *** 202,209 ****
  23068.   static        p_cmatch(), p_isdate(), p_ishead(), p_parse(), any();
  23069.   #else
  23070.   #define    MBX_READ    mbx_read
  23071. - extern    int    mbx_read ();
  23072.   #endif
  23073.   
  23074.   static int    setup(), setupaux(), read_map(), read_file(), pmbx_size();
  23075.   static int    quitaux(), quitfile(), respond(), getline();
  23076. --- 237,244 ----
  23077.   static        p_cmatch(), p_isdate(), p_ishead(), p_parse(), any();
  23078.   #else
  23079.   #define    MBX_READ    mbx_read
  23080.   #endif
  23081. + extern    int    mbx_read ();
  23082.   
  23083.   static int    setup(), setupaux(), read_map(), read_file(), pmbx_size();
  23084.   static int    quitaux(), quitfile(), respond(), getline();
  23085. ***************
  23086. *** 217,223 ****
  23087.       BBhead = BBtail = NULL;
  23088.       while (getbbaux (NULLCP))
  23089.       continue;
  23090. ! #endif    BPOP
  23091.   }
  23092.   
  23093.   popassert () {
  23094. --- 252,258 ----
  23095.       BBhead = BBtail = NULL;
  23096.       while (getbbaux (NULLCP))
  23097.       continue;
  23098. ! #endif    /* BPOP */
  23099.   }
  23100.   
  23101.   popassert () {
  23102. ***************
  23103. *** 273,302 ****
  23104.       BBhead = BBtail = NULL;
  23105.       while (getbbaux (NULLCP))
  23106.       continue;
  23107. ! #endif    BPOP
  23108.   }
  23109.   
  23110.   /*   */
  23111.   
  23112.   pop (in, out, priv, rhost)
  23113.   int    in,
  23114.       out,
  23115.       priv;
  23116.   char   *rhost;
  23117.   {
  23118.       char    buffer[BUFSIZ],
  23119.              *vec[NVEC + 1];
  23120.   #if    defined (DPOP) || defined (BPOP)
  23121.       register struct passwd *pw;
  23122. ! #endif    defined (DPOP) || defined (BPOP)
  23123.       register struct vector *v;
  23124.   
  23125.       m_foil (NULLCP);
  23126.       mts_init (myname);
  23127.   
  23128. -     rproto = priv;
  23129.       hostname = rhost;
  23130. !     (void) sprintf (server, "%s %s server", myhost, priv ? "RPOP" : "POP");
  23131.   
  23132.       if ((input = fdopen (in, "r")) == NULL
  23133.           || (output = fdopen (out, "w")) == NULL) {/* you lose big */
  23134. --- 308,352 ----
  23135.       BBhead = BBtail = NULL;
  23136.       while (getbbaux (NULLCP))
  23137.       continue;
  23138. ! #endif    /* BPOP */
  23139.   }
  23140.   
  23141.   /*   */
  23142.   
  23143. + #ifdef KPOP
  23144. + static char *kusername;
  23145. + kpop (in, out, principal, rhost, auth)
  23146. + int   in,
  23147. +       out;
  23148. + char  *principal, *rhost;
  23149. + int auth;
  23150. + #else    /* KPOP */
  23151.   pop (in, out, priv, rhost)
  23152.   int    in,
  23153.       out,
  23154.       priv;
  23155.   char   *rhost;
  23156. + #endif    /* KPOP */
  23157.   {
  23158.       char    buffer[BUFSIZ],
  23159.              *vec[NVEC + 1];
  23160.   #if    defined (DPOP) || defined (BPOP)
  23161.       register struct passwd *pw;
  23162. ! #endif    /* defined (DPOP) || defined (BPOP) */
  23163.       register struct vector *v;
  23164.   
  23165.       m_foil (NULLCP);
  23166.       mts_init (myname);
  23167.   
  23168.       hostname = rhost;
  23169. ! #ifdef KPOP
  23170. !     rproto = 1;
  23171. !     (void) sprintf (server, "%s KPOP server", myhost);
  23172. ! #else
  23173. !     rproto = priv;
  23174. !     (void) sprintf (server, "%s server", priv ? "RPOP" : "POP");
  23175. ! #endif    /* KPOP */
  23176.   
  23177.       if ((input = fdopen (in, "r")) == NULL
  23178.           || (output = fdopen (out, "w")) == NULL) {/* you lose big */
  23179. ***************
  23180. *** 304,309 ****
  23181. --- 354,369 ----
  23182.       return;
  23183.       }
  23184.       (void) signal (SIGPIPE, pipeser);
  23185. + #ifdef KPOP
  23186. +     if (principal == NULLCP) {
  23187. +     char buf[512];
  23188. +     strcpy(buf,  "Authentication failed: ");
  23189. +     strcat(buf, krb_err_txt[auth]);
  23190. +     (void) respond (NOTOK, buf);
  23191. +     return;
  23192. +     }
  23193. +     kusername = principal;
  23194. + #endif    /* KPOP */
  23195.   
  23196.   #ifdef    DPOP
  23197.       if ((pw = getpwnam (POPUID)) == NULL || !setpwinfo (pw, POPDB, 1)) {
  23198. ***************
  23199. *** 313,319 ****
  23200.       }
  23201.       pop_uid = pw -> pw_uid;
  23202.       pop_gid = pw -> pw_gid;
  23203. ! #endif    DPOP
  23204.   #ifdef    BPOP
  23205.       if ((pw = getpwnam (popbbuser)) && pw -> pw_uid) {
  23206.       guest_uid = pw -> pw_uid;
  23207. --- 373,379 ----
  23208.       }
  23209.       pop_uid = pw -> pw_uid;
  23210.       pop_gid = pw -> pw_gid;
  23211. ! #endif    /* DPOP */
  23212.   #ifdef    BPOP
  23213.       if ((pw = getpwnam (popbbuser)) && pw -> pw_uid) {
  23214.       guest_uid = pw -> pw_uid;
  23215. ***************
  23216. *** 321,331 ****
  23217.       }
  23218.       else
  23219.       guest_uid = guest_gid = 0;
  23220. ! #endif    BPOP
  23221.   
  23222. !     (void) respond (OK, "%s ready (Comments to: PostMaster@%s)",
  23223. !         server, myhost);
  23224.   
  23225.       for (mystate = auth1; mystate != halt && mystate != error;)
  23226.       switch (getline (buffer, sizeof buffer, input)) {
  23227.           case OK: 
  23228. --- 381,396 ----
  23229.       }
  23230.       else
  23231.       guest_uid = guest_gid = 0;
  23232. ! #endif    /* BPOP */
  23233.   
  23234. !     {
  23235. !     long    clock;
  23236.   
  23237. +     (void) time (&clock);
  23238. +     (void) sprintf (timestamp, "<%d.%ld@%s>", getpid (), clock, myhost);
  23239. +     }
  23240. +     (void) respond (OK, "%s ready %s", server, timestamp);
  23241.       for (mystate = auth1; mystate != halt && mystate != error;)
  23242.       switch (getline (buffer, sizeof buffer, input)) {
  23243.           case OK: 
  23244. ***************
  23245. *** 360,367 ****
  23246.   register char  **vec;
  23247.   {
  23248.       make_lower (username, vec[1]);
  23249.       return respond (OK, "password required for %s", username);
  23250.   }
  23251.   
  23252.   /*   */
  23253. --- 425,441 ----
  23254.   register char  **vec;
  23255.   {
  23256.       make_lower (username, vec[1]);
  23257. ! #ifdef KPOP
  23258. !     if (!strcmp(username, kusername))
  23259. !       return respond (OK, "Kerberos authentication succeeded. Send username as password (%s)", username);
  23260. !     else {
  23261. !     respond (NOTOK, "Wrong username supplied (%s vs. %s)",
  23262. !          kusername, username);
  23263. !     return (NOTOK);
  23264. !     }
  23265. ! #else
  23266.       return respond (OK, "password required for %s", username);
  23267. + #endif
  23268.   }
  23269.   
  23270.   /*   */
  23271. ***************
  23272. *** 374,384 ****
  23273.       register struct passwd *pw;
  23274.   #ifdef    SHADOW
  23275.       register struct spwd *shpw;
  23276. ! #endif    SHADOW
  23277. ! #else    DPOP
  23278.       register struct bboard *pw;
  23279. ! #endif    DPOP
  23280.   
  23281.   #ifndef    DPOP
  23282.   #ifdef    BPOP
  23283.       if (isguest ()) {
  23284. --- 448,478 ----
  23285.       register struct passwd *pw;
  23286.   #ifdef    SHADOW
  23287.       register struct spwd *shpw;
  23288. ! #endif    /* SHADOW */
  23289. ! #else    /* DPOP */
  23290.       register struct bboard *pw;
  23291. ! #endif    /* DPOP */
  23292.   
  23293. + #ifdef KPOP
  23294. + #ifndef DPOP
  23295. +     if ((pw = getpwnam (username)) != NULL)
  23296. +       return setup(pw, FALSE);
  23297. +     else
  23298. +       return respond (NOTOK, "no local password entry");
  23299. + #else
  23300. +     {
  23301. +       static struct bboard entry;
  23302. +       static char entry_file[BUFSIZ] = "/usr/spool/pop";
  23303. +       
  23304. +       pw = &entry;
  23305. +       pw->bb_name = username;
  23306. +       strcat(entry_file, username);
  23307. +       pw->bb_file = entry_file;
  23308. +       return setup(pw, FALSE);
  23309. +     }
  23310. + #endif
  23311. + #else    /* KPOP */
  23312.   #ifndef    DPOP
  23313.   #ifdef    BPOP
  23314.       if (isguest ()) {
  23315. ***************
  23316. *** 388,414 ****
  23317.       gw.pw_name = popbbuser;
  23318.       gw.pw_uid = guest_uid;
  23319.       pw = &gw;
  23320. ! #endif    TRUSTED
  23321.       guest = 1;
  23322.       goto anonymous;
  23323.       }
  23324. ! #endif    BPOP
  23325.       if ((pw = getpwnam (username)) == NULL
  23326.   #ifndef    SHADOW
  23327.           || *pw -> pw_passwd == NULL
  23328.           || strcmp (crypt (vec[1], pw -> pw_passwd), pw -> pw_passwd)) {
  23329. ! #else    SHADOW
  23330.           || (shpw = getspnam (username)) == NULL
  23331.           || *shpw -> sp_pwdp == NULL
  23332.           || strcmp (crypt (vec[1], shpw -> sp_pwdp), shpw -> sp_pwdp)) {
  23333. ! #endif    SHADOW
  23334.   #ifdef    TRUSTED
  23335.       trusted (0, hostname, NULLCP, 0, pw ? pw -> pw_name : username,
  23336.           pw && pw -> pw_uid == 0, POPSERVICE, "tcp", NULL);
  23337. ! #endif    TRUSTED
  23338.       return respond (NOTOK, "login incorrect");
  23339.       }
  23340. ! #else    DPOP
  23341.   #ifdef    BPOP
  23342.       if (isguest ()) {
  23343.       static struct bboard gw;
  23344. --- 482,508 ----
  23345.       gw.pw_name = popbbuser;
  23346.       gw.pw_uid = guest_uid;
  23347.       pw = &gw;
  23348. ! #endif    /* TRUSTED */
  23349.       guest = 1;
  23350.       goto anonymous;
  23351.       }
  23352. ! #endif    /* BPOP */
  23353.       if ((pw = getpwnam (username)) == NULL
  23354.   #ifndef    SHADOW
  23355.           || *pw -> pw_passwd == NULL
  23356.           || strcmp (crypt (vec[1], pw -> pw_passwd), pw -> pw_passwd)) {
  23357. ! #else    /* SHADOW */
  23358.           || (shpw = getspnam (username)) == NULL
  23359.           || *shpw -> sp_pwdp == NULL
  23360.           || strcmp (crypt (vec[1], shpw -> sp_pwdp), shpw -> sp_pwdp)) {
  23361. ! #endif    /* SHADOW */
  23362.   #ifdef    TRUSTED
  23363.       trusted (0, hostname, NULLCP, 0, pw ? pw -> pw_name : username,
  23364.           pw && pw -> pw_uid == 0, POPSERVICE, "tcp", NULL);
  23365. ! #endif    /* TRUSTED */
  23366.       return respond (NOTOK, "login incorrect");
  23367.       }
  23368. ! #else    /* DPOP */
  23369.   #ifdef    BPOP
  23370.       if (isguest ()) {
  23371.       static struct bboard gw;
  23372. ***************
  23373. *** 418,424 ****
  23374.       guest = 1;
  23375.       goto anonymous;
  23376.       }
  23377. ! #endif    BPOP
  23378.       if (((pw = getbbnam (username)) == NULL
  23379.           && (pw = getbbaka (username)) == NULL)
  23380.           || *pw -> bb_passwd == NULL
  23381. --- 512,518 ----
  23382.       guest = 1;
  23383.       goto anonymous;
  23384.       }
  23385. ! #endif    /* BPOP */
  23386.       if (((pw = getbbnam (username)) == NULL
  23387.           && (pw = getbbaka (username)) == NULL)
  23388.           || *pw -> bb_passwd == NULL
  23389. ***************
  23390. *** 426,451 ****
  23391.   #ifdef    TRUSTED
  23392.       trusted (0, hostname, NULLCP, 0, pw ? pw -> bb_name : username,
  23393.           0, POPSERVICE, "tcp", NULL);
  23394. ! #endif    TRUSTED
  23395.       return respond (NOTOK, "login incorrect");
  23396.       }
  23397. ! #endif    DPOP
  23398.   
  23399.   #ifdef    BPOP
  23400.   anonymous: ;
  23401. ! #endif    BPOP
  23402.   #ifdef    TRUSTED
  23403.       if (trusted (1, hostname, NULLCP, 0, myhost,
  23404.   #ifndef    DPOP
  23405.           pw -> pw_name, pw -> pw_uid == 0,
  23406. ! #else    DPOP
  23407.           pw -> bb_name, 0,
  23408. ! #endif    DPOP
  23409.           POPSERVICE, "tcp", NULL)
  23410.           == 0)
  23411.       return respond (NOTOK, "permission denied");
  23412. ! #endif    TRUSTED
  23413.       return setup (pw, guest);
  23414.   }
  23415.   
  23416.   /*   */
  23417. --- 520,546 ----
  23418.   #ifdef    TRUSTED
  23419.       trusted (0, hostname, NULLCP, 0, pw ? pw -> bb_name : username,
  23420.           0, POPSERVICE, "tcp", NULL);
  23421. ! #endif    /* TRUSTED */
  23422.       return respond (NOTOK, "login incorrect");
  23423.       }
  23424. ! #endif    /* DPOP */
  23425.   
  23426.   #ifdef    BPOP
  23427.   anonymous: ;
  23428. ! #endif    /* BPOP */
  23429.   #ifdef    TRUSTED
  23430.       if (trusted (1, hostname, NULLCP, 0, myhost,
  23431.   #ifndef    DPOP
  23432.           pw -> pw_name, pw -> pw_uid == 0,
  23433. ! #else    /* DPOP */
  23434.           pw -> bb_name, 0,
  23435. ! #endif    /* DPOP */
  23436.           POPSERVICE, "tcp", NULL)
  23437.           == 0)
  23438.       return respond (NOTOK, "permission denied");
  23439. ! #endif    /* TRUSTED */
  23440.       return setup (pw, guest);
  23441. + #endif /* KPOP */
  23442.   }
  23443.   
  23444.   /*   */
  23445. ***************
  23446. *** 477,483 ****
  23447.   
  23448.       return i;
  23449.   }
  23450. ! #endif    BPOP
  23451.   
  23452.   /*   */
  23453.   
  23454. --- 572,578 ----
  23455.   
  23456.       return i;
  23457.   }
  23458. ! #endif    /* BPOP */
  23459.   
  23460.   /*   */
  23461.   
  23462. ***************
  23463. *** 487,499 ****
  23464.   {
  23465.   #ifndef    DPOP
  23466.       register struct passwd *pw;
  23467. ! #else    DPOP
  23468.       register int hostok = 0;
  23469.       register char  *bp,
  23470.              *cp;
  23471.       char    buffer[BUFSIZ];
  23472.       register struct bboard *pw;
  23473. ! #endif    DPOP
  23474.   
  23475.   #ifndef    DPOP
  23476.       if (!rproto || (pw = getpwnam (username)) == NULL) {
  23477. --- 582,594 ----
  23478.   {
  23479.   #ifndef    DPOP
  23480.       register struct passwd *pw;
  23481. ! #else    /* DPOP */
  23482.       register int hostok = 0;
  23483.       register char  *bp,
  23484.              *cp;
  23485.       char    buffer[BUFSIZ];
  23486.       register struct bboard *pw;
  23487. ! #endif    /* DPOP */
  23488.   
  23489.   #ifndef    DPOP
  23490.       if (!rproto || (pw = getpwnam (username)) == NULL) {
  23491. ***************
  23492. *** 500,506 ****
  23493.   #ifdef    TRUSTED
  23494.       trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
  23495.           NULL);
  23496. ! #endif    TRUSTED
  23497.       return respond (NOTOK, "login incorrect");
  23498.       }
  23499.       if (chdir (pw -> pw_dir) == NOTOK && chdir ("/") == NOTOK)
  23500. --- 595,601 ----
  23501.   #ifdef    TRUSTED
  23502.       trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
  23503.           NULL);
  23504. ! #endif    /* TRUSTED */
  23505.       return respond (NOTOK, "login incorrect");
  23506.       }
  23507.       if (chdir (pw -> pw_dir) == NOTOK && chdir ("/") == NOTOK)
  23508. ***************
  23509. *** 509,518 ****
  23510.   #ifdef    TRUSTED
  23511.       trusted (0, hostname, vec[1], 0, pw -> pw_name,
  23512.          pw -> pw_uid == 0, "rpop", "tcp", NULL);
  23513. ! #endif    TRUSTED
  23514.       return respond (NOTOK, "permission denied");
  23515.       }
  23516. ! #else    DPOP
  23517.       if (!rproto
  23518.           || ((pw = getbbnam (username)) == NULL
  23519.           && (pw = getbbaka (username)) == NULL)) {
  23520. --- 604,613 ----
  23521.   #ifdef    TRUSTED
  23522.       trusted (0, hostname, vec[1], 0, pw -> pw_name,
  23523.          pw -> pw_uid == 0, "rpop", "tcp", NULL);
  23524. ! #endif    /* TRUSTED */
  23525.       return respond (NOTOK, "permission denied");
  23526.       }
  23527. ! #else    /* DPOP */
  23528.       if (!rproto
  23529.           || ((pw = getbbnam (username)) == NULL
  23530.           && (pw = getbbaka (username)) == NULL)) {
  23531. ***************
  23532. *** 519,525 ****
  23533.   #ifdef    TRUSTED
  23534.       trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
  23535.           NULL);
  23536. ! #endif    TRUSTED
  23537.       return respond (NOTOK, "login incorrect");
  23538.       }
  23539.   /*
  23540. --- 614,620 ----
  23541.   #ifdef    TRUSTED
  23542.       trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
  23543.           NULL);
  23544. ! #endif    /* TRUSTED */
  23545.       return respond (NOTOK, "login incorrect");
  23546.       }
  23547.   /*
  23548. ***************
  23549. *** 530,536 ****
  23550.       (void) sprintf (buffer, "%s@%s", vec[1], hostname);
  23551.       for (bp = pw -> bb_addr; bp; bp = cp) {
  23552.       if ((cp = index (bp, ',')))
  23553. !         *cp = NULL;
  23554.       hostok = uleq (bp, buffer);
  23555.       if (cp)
  23556.           *cp++ = ',';
  23557. --- 625,631 ----
  23558.       (void) sprintf (buffer, "%s@%s", vec[1], hostname);
  23559.       for (bp = pw -> bb_addr; bp; bp = cp) {
  23560.       if ((cp = index (bp, ',')))
  23561. !         *cp = 0;
  23562.       hostok = uleq (bp, buffer);
  23563.       if (cp)
  23564.           *cp++ = ',';
  23565. ***************
  23566. *** 541,574 ****
  23567.   #ifdef    TRUSTED
  23568.       trusted (0, hostname, vec[1], 0, pw -> bb_name, 0, "rpop",
  23569.           "tcp", NULL);
  23570. ! #endif    TRUSTED
  23571.       return respond (NOTOK, "permission denied");
  23572.       }
  23573. ! #endif    DPOP
  23574.   
  23575.   #ifdef    TRUSTED
  23576.       if (trusted (1, hostname, vec[1], 0, username,
  23577.   #ifndef    DPOP
  23578.           pw -> pw_uid == 0,
  23579. ! #else    DPOP
  23580.           0,
  23581. ! #endif    DPOP
  23582.           "rpop", "tcp", NULL)
  23583.           == 0)
  23584.       return respond (NOTOK, "permission denied");
  23585. ! #endif    TRUSTED
  23586.       return setup (pw, FALSE);
  23587.   }
  23588. ! #endif    RPOP
  23589.   
  23590.   /*   */
  23591.   
  23592.   static int setup (pw, guest)
  23593.   #ifndef    DPOP
  23594.   register struct passwd *pw;
  23595. ! #else    DPOP
  23596.   register struct bboard *pw;
  23597. ! #endif    DPOP
  23598.   int    guest;
  23599.   {
  23600.   #ifdef    BPOP
  23601. --- 636,761 ----
  23602.   #ifdef    TRUSTED
  23603.       trusted (0, hostname, vec[1], 0, pw -> bb_name, 0, "rpop",
  23604.           "tcp", NULL);
  23605. ! #endif    /* TRUSTED */
  23606.       return respond (NOTOK, "permission denied");
  23607.       }
  23608. ! #endif    /* DPOP */
  23609.   
  23610.   #ifdef    TRUSTED
  23611.       if (trusted (1, hostname, vec[1], 0, username,
  23612.   #ifndef    DPOP
  23613.           pw -> pw_uid == 0,
  23614. ! #else    /* DPOP */
  23615.           0,
  23616. ! #endif    /* DPOP */
  23617.           "rpop", "tcp", NULL)
  23618.           == 0)
  23619.       return respond (NOTOK, "permission denied");
  23620. ! #endif    /* TRUSTED */
  23621.       return setup (pw, FALSE);
  23622.   }
  23623. ! #endif    /* RPOP */
  23624.   
  23625.   /*   */
  23626.   
  23627. + #ifdef    APOP
  23628. + #include "popauth.h"
  23629. + #include "../../uip/md5.c"
  23630. + #include <ndbm.h>
  23631. + #include <sys/file.h>
  23632. + #ifdef    SYS5
  23633. + #include <fcntl.h>
  23634. + #endif
  23635. + static int apop (vec)
  23636. + register char  **vec;
  23637. + {
  23638. +     register char *cp;
  23639. +     char    buffer[BUFSIZ];
  23640. +     register unsigned char *dp;
  23641. +     unsigned char *ep,
  23642. +            digest[16];
  23643. + #ifndef    DPOP
  23644. +     register struct passwd *pw;
  23645. + #else
  23646. +     register struct bboard *pw;
  23647. + #endif
  23648. +     struct stat st;
  23649. +     datum   key,
  23650. +         value;
  23651. +     DBM       *db;
  23652. +     MD5_CTX mdContext;
  23653. +     struct authinfo auth;
  23654. +     (void) strcpy (username, vec[1]);
  23655. + #ifndef    DPOP
  23656. +     if ((pw = getpwnam (username)) == NULL
  23657. +         || *pw -> pw_passwd == NULL) {
  23658. +     return respond (NOTOK, "user invalid");
  23659. +     }
  23660. + #else
  23661. +     if (((pw = getbbnam (username)) == NULL
  23662. +         && (pw = getbbaka (username)) == NULL)
  23663. +         || *pw -> bb_passwd == NULL) {
  23664. +     return respond (NOTOK, "subscriber invalid");
  23665. +     }
  23666. + #endif
  23667. +     if ((db = dbm_open (APOP, O_RDONLY, 0)) == NULL)
  23668. +     return respond (NOTOK, "POP authorization DB not available (%d)",
  23669. +             errno);
  23670. +     if (fstat (dbm_pagfno (db), &st) != NOTOK
  23671. +         && (st.st_mode & 0777) != 0600) {
  23672. +     dbm_close (db);
  23673. +     return respond (NOTOK, "POP authorization DB has wrong mode (0%o)",
  23674. +             st.st_mode & 0777);
  23675. +     }
  23676. +     if (flock (dbm_pagfno (db), LOCK_SH) == NOTOK) {
  23677. +     dbm_close (db);
  23678. +     return respond (NOTOK, "unable to lock POP authorization DB (%d)",
  23679. +             errno);
  23680. +     }
  23681. +     key.dsize = strlen (key.dptr = vec[1]) + 1;
  23682. +     value = dbm_fetch (db, key);
  23683. +     if (value.dptr == NULL) {
  23684. +     dbm_close (db);
  23685. +     return respond (NOTOK, "not authorized");
  23686. +     }
  23687. +     bcopy (value.dptr, (char *) &auth, sizeof auth);
  23688. +     (void) sprintf (cp = buffer, "%s%*.*s", timestamp, auth.auth_secretlen,
  23689. +             auth.auth_secretlen, auth.auth_secret);
  23690. +     dbm_close (db);
  23691. +     MD5Init (&mdContext);
  23692. +     MD5Update (&mdContext, (unsigned char *) buffer,
  23693. +            (unsigned int) (strlen (timestamp) + auth.auth_secretlen));
  23694. +     MD5Final (digest, &mdContext);
  23695. +     cp = buffer;
  23696. +     for (ep = (dp = digest) + sizeof digest / sizeof digest[0];
  23697. +          dp < ep;
  23698. +          cp += 2)
  23699. +     (void) sprintf (cp, "%02x", *dp++ & 0xff);
  23700. +     *cp = NULL;
  23701. +     if (strcmp (vec[2], buffer))
  23702. +     return respond (NOTOK, "authentication failure");
  23703. +     return setup (pw, 0);
  23704. + }
  23705. + #endif
  23706. + /*   */
  23707.   static int setup (pw, guest)
  23708.   #ifndef    DPOP
  23709.   register struct passwd *pw;
  23710. ! #else    /* DPOP */
  23711.   register struct bboard *pw;
  23712. ! #endif    /* DPOP */
  23713.   int    guest;
  23714.   {
  23715.   #ifdef    BPOP
  23716. ***************
  23717. *** 576,610 ****
  23718.       (void) setgid (guest_gid);
  23719.   #ifndef    SYS5
  23720.       (void) initgroups (popbbuser, guest_gid);
  23721. ! #endif    SYS5
  23722.       (void) setuid (guest_uid);
  23723.       }
  23724.       else {
  23725. ! #endif    BPOP
  23726.   #ifndef    DPOP
  23727.       (void) setgid (pw -> pw_gid);
  23728.   #ifndef    SYS5
  23729.       (void) initgroups (pw -> pw_name, pw -> pw_gid);
  23730. ! #endif    SYS5
  23731.       (void) setuid (pw -> pw_uid);
  23732. ! #else    DPOP
  23733.       (void) setgid (pop_gid);
  23734.   #ifndef    SYS5
  23735.       (void) initgroups (POPUID, pop_gid);
  23736. ! #endif    SYS5
  23737.       (void) setuid (pop_uid);
  23738. ! #endif    DPOP
  23739.   #ifdef    BPOP
  23740.       }
  23741. ! #endif    BPOP
  23742.   
  23743.   #ifndef    DPOP
  23744.       (void) sprintf (maildrop, "%s/%s",
  23745.           mmdfldir && *mmdfldir ? mmdfldir : pw -> pw_dir,
  23746.           mmdflfil && *mmdflfil ? mmdflfil : pw -> pw_name);
  23747. ! #else    DPOP
  23748.       (void) strcpy (maildrop, pw -> bb_file);
  23749. ! #endif    DPOP
  23750.   
  23751.       if (setupaux (guest) == NOTOK)
  23752.       return NOTOK;
  23753. --- 763,797 ----
  23754.       (void) setgid (guest_gid);
  23755.   #ifndef    SYS5
  23756.       (void) initgroups (popbbuser, guest_gid);
  23757. ! #endif    /* SYS5 */
  23758.       (void) setuid (guest_uid);
  23759.       }
  23760.       else {
  23761. ! #endif    /* BPOP */
  23762.   #ifndef    DPOP
  23763.       (void) setgid (pw -> pw_gid);
  23764.   #ifndef    SYS5
  23765.       (void) initgroups (pw -> pw_name, pw -> pw_gid);
  23766. ! #endif    /* SYS5 */
  23767.       (void) setuid (pw -> pw_uid);
  23768. ! #else    /* DPOP */
  23769.       (void) setgid (pop_gid);
  23770.   #ifndef    SYS5
  23771.       (void) initgroups (POPUID, pop_gid);
  23772. ! #endif    /* SYS5 */
  23773.       (void) setuid (pop_uid);
  23774. ! #endif    /* DPOP */
  23775.   #ifdef    BPOP
  23776.       }
  23777. ! #endif    /* BPOP */
  23778.   
  23779.   #ifndef    DPOP
  23780.       (void) sprintf (maildrop, "%s/%s",
  23781.           mmdfldir && *mmdfldir ? mmdfldir : pw -> pw_dir,
  23782.           mmdflfil && *mmdflfil ? mmdflfil : pw -> pw_name);
  23783. ! #else    /* DPOP */
  23784.       (void) strcpy (maildrop, pw -> bb_file);
  23785. ! #endif    /* DPOP */
  23786.   
  23787.       if (setupaux (guest) == NOTOK)
  23788.       return NOTOK;
  23789. ***************
  23790. *** 616,622 ****
  23791.           nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
  23792.       }
  23793.       else
  23794. ! #endif    POP2
  23795.       return respond (OK,
  23796.           nmsgs ? "maildrop has %d message%s (%d octets)" : "maildrop empty",
  23797.           nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
  23798. --- 803,809 ----
  23799.           nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
  23800.       }
  23801.       else
  23802. ! #endif    /* POP2 */
  23803.       return respond (OK,
  23804.           nmsgs ? "maildrop has %d message%s (%d octets)" : "maildrop empty",
  23805.           nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
  23806. ***************
  23807. *** 633,639 ****
  23808.   
  23809.   #ifdef    BPOP
  23810.       xtnded = 0;
  23811. ! #endif    BPOP
  23812.       if ((dp = readonly ? fopen (maildrop, "r") : lkfopen (maildrop, "r"))
  23813.           == NULL)
  23814.       switch (errno) {
  23815. --- 820,826 ----
  23816.   
  23817.   #ifdef    BPOP
  23818.       xtnded = 0;
  23819. ! #endif    /* BPOP */
  23820.       if ((dp = readonly ? fopen (maildrop, "r") : lkfopen (maildrop, "r"))
  23821.           == NULL)
  23822.       switch (errno) {
  23823. ***************
  23824. *** 877,883 ****
  23825.       respond ('#', "0 unable to change folders");
  23826.       return NOTOK;
  23827.   }
  23828. ! #endif    POP2
  23829.   
  23830.   static int  list (vec)
  23831.   register char  **vec;
  23832. --- 1064,1070 ----
  23833.       respond ('#', "0 unable to change folders");
  23834.       return NOTOK;
  23835.   }
  23836. ! #endif    /* POP2 */
  23837.   
  23838.   static int  list (vec)
  23839.   register char  **vec;
  23840. ***************
  23841. *** 892,901 ****
  23842.   
  23843.   #ifndef    BPOP
  23844.       return respond (OK, "%d %d", i, Msgs[i].m_size);
  23845. ! #else    BPOP
  23846.       return respond (OK, xtnded ? "%d %d %d" : "%d %d",
  23847. !         i, Msgs[i].m_size, Msgs[i].m_id);
  23848. ! #endif    BPOP
  23849.       }
  23850.   
  23851.       (void) respond (OK, "%d message%s (%d octets)",
  23852. --- 1079,1113 ----
  23853.   
  23854.   #ifndef    BPOP
  23855.       return respond (OK, "%d %d", i, Msgs[i].m_size);
  23856. ! #else    /* BPOP */
  23857. ! #ifdef    MPOP
  23858. !     if (nfs && !xtnded) {
  23859. !         char   *cp;
  23860. !         (void) fseek (dp, Msgs[i].m_start, 0);
  23861. !         switch (scan (dp, i, 0, nfs, 0, 0, NULLCP,
  23862. !               (long) Msgs[i].m_size, 0)) {
  23863. !         case SCNMSG:
  23864. !         case SCNENC:
  23865. !         case SCNERR:
  23866. !             if (cp = index (scanl, '\n'))
  23867. !             *cp = NULL;
  23868. !             return respond (OK, "%d %d #%s",
  23869. !                     i, Msgs[i].m_size, scanl);
  23870. !         case SCNEOF:
  23871. !             return respond (OK, "%d %d #%*d  empty",
  23872. !                     i, Msgs[i].m_size, DMAXFOLDER, i);
  23873. !         default:
  23874. !             break;
  23875. !         }
  23876. !     }
  23877. ! #endif /* MPOP */
  23878.       return respond (OK, xtnded ? "%d %d %d" : "%d %d",
  23879. !             i, Msgs[i].m_size, Msgs[i].m_id);
  23880. ! #endif    /* BPOP */
  23881.       }
  23882.   
  23883.       (void) respond (OK, "%d message%s (%d octets)",
  23884. ***************
  23885. *** 902,914 ****
  23886.           nmsgs - dmsgs, nmsgs - dmsgs != 1 ? "s" : "",
  23887.           Msgs[0].m_size);
  23888.       for (i = 1; i <= nmsgs; i++)
  23889. !     if (!(Msgs[i].m_flags & MDELE))
  23890.   #ifndef BPOP
  23891.           multiline ("%d %d", i, Msgs[i].m_size);
  23892. ! #else    BPOP
  23893.           multiline (xtnded ? "%d %d %d" : "%d %d",
  23894. !             i, Msgs[i].m_size, Msgs[i].m_id);
  23895. ! #endif    BPOP
  23896.       multiend ();
  23897.   
  23898.       return OK;
  23899. --- 1114,1154 ----
  23900.           nmsgs - dmsgs, nmsgs - dmsgs != 1 ? "s" : "",
  23901.           Msgs[0].m_size);
  23902.       for (i = 1; i <= nmsgs; i++)
  23903. !     if (!(Msgs[i].m_flags & MDELE)) {
  23904.   #ifndef BPOP
  23905.           multiline ("%d %d", i, Msgs[i].m_size);
  23906. ! #else    /* BPOP */
  23907. ! #ifdef    MPOP
  23908. !         if (nfs && !xtnded) {
  23909. !         char   *cp;
  23910. !         (void) fseek (dp, Msgs[i].m_start, 0);
  23911. !         switch (scan (dp, i, 0, nfs, 0, 0, NULLCP,
  23912. !                   (long) Msgs[i].m_size, 0)) {
  23913. !             case SCNMSG:
  23914. !             case SCNENC:
  23915. !             case SCNERR:
  23916. !                 if (cp = index (scanl, '\n'))
  23917. !                 *cp = NULL;
  23918. !                 multiline ("%d %d #%s",
  23919. !                    i, Msgs[i].m_size, scanl);
  23920. !             continue;
  23921. !             case SCNEOF:
  23922. !             multiline ("%d %d #%*d  empty",
  23923. !                    i, Msgs[i].m_size, DMAXFOLDER, i);
  23924. !             continue;
  23925. !             default:
  23926. !             break;
  23927. !         }
  23928. !         }
  23929. ! #endif /* MPOP */
  23930.           multiline (xtnded ? "%d %d %d" : "%d %d",
  23931. !                i, Msgs[i].m_size, Msgs[i].m_id);
  23932. ! #endif    /* BPOP */
  23933. !     }
  23934.       multiend ();
  23935.   
  23936.       return OK;
  23937. ***************
  23938. *** 945,951 ****
  23939.           fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
  23940.           pos += (long) (cp - buffer + 1)) {
  23941.       if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  23942. !         *cp = NULL;
  23943.       multiline ("%s", buffer);
  23944.       }
  23945.   #ifdef    POP2
  23946. --- 1185,1191 ----
  23947.           fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
  23948.           pos += (long) (cp - buffer + 1)) {
  23949.       if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  23950. !         *cp = 0;
  23951.       multiline ("%s", buffer);
  23952.       }
  23953.   #ifdef    POP2
  23954. ***************
  23955. *** 1004,1009 ****
  23956. --- 1244,1259 ----
  23957.   
  23958.       Msgs[0].m_last = lastseen;
  23959.   
  23960. + #ifdef    MPOP
  23961. + #ifdef    BPOP
  23962. +     if (nfs) {
  23963. +     if (scanl)
  23964. +         free (scanl), scanl = NULL;
  23965. +     free (nfs), nfs = NULL;
  23966. +     }
  23967. + #endif
  23968. + #endif /* MPOP */
  23969.       return status (vec);
  23970.   }
  23971.   
  23972. ***************
  23973. *** 1024,1030 ****
  23974.       return respond (NOTOK, "no such message: \"%s\"", vec[1]);
  23975.       if (Msgs[i].m_flags & MDELE)
  23976.       return respond (NOTOK, "message %d is deleted", i);
  23977. !     if ((j = atoi (vec[2])) <= 0)
  23978.       return respond (NOTOK, "bad number: \"%s\"", vec[2]);
  23979.   
  23980.       (void) respond (OK, vec[0]);
  23981. --- 1274,1280 ----
  23982.       return respond (NOTOK, "no such message: \"%s\"", vec[1]);
  23983.       if (Msgs[i].m_flags & MDELE)
  23984.       return respond (NOTOK, "message %d is deleted", i);
  23985. !     if ((j = atoi (vec[2])) < 0)
  23986.       return respond (NOTOK, "bad number: \"%s\"", vec[2]);
  23987.   
  23988.       (void) respond (OK, vec[0]);
  23989. ***************
  23990. *** 1034,1046 ****
  23991.           fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
  23992.           pos += (long) (cp - buffer + 1)) {
  23993.       if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  23994. !         *cp = NULL;
  23995.       if (body) {
  23996.           if (lines++ >= j)
  23997.           break;
  23998.       }
  23999.       else
  24000. !         if (*buffer == NULL)
  24001.           body++;
  24002.       multiline ("%s", buffer);
  24003.       }
  24004. --- 1284,1296 ----
  24005.           fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
  24006.           pos += (long) (cp - buffer + 1)) {
  24007.       if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  24008. !         *cp = 0;
  24009.       if (body) {
  24010.           if (lines++ >= j)
  24011.           break;
  24012.       }
  24013.       else
  24014. !         if (*buffer == 0)
  24015.           body++;
  24016.       multiline ("%s", buffer);
  24017.       }
  24018. ***************
  24019. *** 1051,1056 ****
  24020. --- 1301,1308 ----
  24021.   
  24022.   /*   */
  24023.   
  24024. + /* ARGSUSED */
  24025.   static int  last (vec)  
  24026.   char  **vec;
  24027.   {
  24028. ***************
  24029. *** 1069,1074 ****
  24030. --- 1321,1330 ----
  24031.       return xtnd1 (vec);
  24032.       if (strcmp (vec[1], "x-bboards") == 0)
  24033.       return xtnd2 (vec);
  24034. + #ifdef    MPOP
  24035. +     if (strcmp (vec[1], "scan") == 0)
  24036. +     return xtnd3 (vec);
  24037. + #endif /* MPOP */
  24038.   
  24039.       return respond (NOTOK, "unknown XTND command: \"%s\"", vec[1]);
  24040.   }
  24041. ***************
  24042. *** 1263,1272 ****
  24043.       padvise (NULLCP, LOG_DEBUG, "updated: \"%s\", 0%o, %d, %s",
  24044.           bb -> bb_name, bb -> bb_flags, bb -> bb_maxima, bb -> bb_date);
  24045.   }
  24046. - #endif    BPOP
  24047.   
  24048.   /*   */
  24049.   
  24050.   static int  quit (vec)
  24051.   char   **vec;
  24052.   {
  24053. --- 1519,1548 ----
  24054.       padvise (NULLCP, LOG_DEBUG, "updated: \"%s\", 0%o, %d, %s",
  24055.           bb -> bb_name, bb -> bb_flags, bb -> bb_maxima, bb -> bb_date);
  24056.   }
  24057.   
  24058.   /*   */
  24059.   
  24060. + #ifdef    MPOP
  24061. + static int xtnd3 (vec)
  24062. + register char **vec;
  24063. + {
  24064. +     if (vec[2] == NULL)
  24065. +     return respond (NOTOK, "too few arguments to XTND \"%s\"", vec[1]);
  24066. +     if ((_sc_width = atoi (vec[2])) < WIDTH / 2)
  24067. +     _sc_width = WIDTH / 2;
  24068. +     nfs = new_fs (NULLCP, vec[3], FORMAT);
  24069. +     if (scanl)
  24070. +     (void) free (scanl), scanl = NULL;
  24071. +     return respond (OK, vec[1]);
  24072. + }
  24073. + int    sc_width () { return _sc_width; }
  24074. + #endif /* MPOP */
  24075. + #endif    /* BPOP */
  24076. + /*   */
  24077.   static int  quit (vec)
  24078.   char   **vec;
  24079.   {
  24080. ***************
  24081. *** 1281,1287 ****
  24082.   #ifdef    BPOP
  24083.       if (xtnded)
  24084.       return respond (OK, "%s signing off", server);
  24085. ! #endif    BPOP
  24086.   
  24087.       if (n == d)
  24088.       return respond (OK, "%s signing off (maildrop empty)", server);
  24089. --- 1557,1563 ----
  24090.   #ifdef    BPOP
  24091.       if (xtnded)
  24092.       return respond (OK, "%s signing off", server);
  24093. ! #endif    /* BPOP */
  24094.   
  24095.       if (n == d)
  24096.       return respond (OK, "%s signing off (maildrop empty)", server);
  24097. ***************
  24098. *** 1326,1335 ****
  24099.               map2[BUFSIZ];
  24100.       struct stat st;
  24101.   
  24102. !     if ((dmsgs == 0 && rmsgs == 0) || (Msgs[0].m_flags & MREAD))
  24103.       return OK;
  24104.   
  24105. - if(debug)padvise(NULLCP,LOG_DEBUG,"XXX: rmsgs=%d",rmsgs);
  24106.       if (fstat (fileno (dp), &st) == NOTOK)
  24107.       return respond (NOTOK, "unable to stat file");
  24108.       if (mtime != st.st_mtime)
  24109. --- 1602,1613 ----
  24110.               map2[BUFSIZ];
  24111.       struct stat st;
  24112.   
  24113. ! if(debug)padvise(NULLCP,LOG_DEBUG,"XXX: dmsgs=%d rmsgs=%d readonly=%d",
  24114. !          dmsgs, rmsgs, Msgs[0].m_flags & MREAD);
  24115. !     if (dmsgs == 0 || (Msgs[0].m_flags & MREAD))
  24116.       return OK;
  24117.   
  24118.       if (fstat (fileno (dp), &st) == NOTOK)
  24119.       return respond (NOTOK, "unable to stat file");
  24120.       if (mtime != st.st_mtime)
  24121. ***************
  24122. *** 1339,1348 ****
  24123.       if (nmsgs == dmsgs) {
  24124.   #ifndef    SYS5
  24125.       i = truncate (maildrop, 0);
  24126. ! #else    SYS5
  24127.       i = open (maildrop, O_WRONLY | O_TRUNC);
  24128.       if (i != NOTOK) (void) close (i);
  24129. ! #endif    SYS5
  24130.       (void) unlink (map_name (maildrop));/* XXX */
  24131.       if (i == NOTOK)
  24132.           return respond (NOTOK, "unable to zero %s", maildrop);
  24133. --- 1617,1626 ----
  24134.       if (nmsgs == dmsgs) {
  24135.   #ifndef    SYS5
  24136.       i = truncate (maildrop, 0);
  24137. ! #else    /* SYS5 */
  24138.       i = open (maildrop, O_WRONLY | O_TRUNC);
  24139.       if (i != NOTOK) (void) close (i);
  24140. ! #endif    /* SYS5 */
  24141.       (void) unlink (map_name (maildrop));/* XXX */
  24142.       if (i == NOTOK)
  24143.           return respond (NOTOK, "unable to zero %s", maildrop);
  24144. ***************
  24145. *** 1403,1413 ****
  24146.   
  24147.       for (i = 0; i < NVEC; i++) {
  24148.       while (isspace (*bp))
  24149. !         *bp++ = NULL;
  24150. !     if (*bp == NULL) {
  24151.           vec[i] = NULL;
  24152.           break;
  24153.       }
  24154.       vec[i] = bp;
  24155.       while (!isspace (*bp))
  24156.           bp++;
  24157. --- 1681,1715 ----
  24158.   
  24159.       for (i = 0; i < NVEC; i++) {
  24160.       while (isspace (*bp))
  24161. !         *bp++ = 0;
  24162. !     if (*bp == 0) {
  24163.           vec[i] = NULL;
  24164.           break;
  24165.       }
  24166. +     if (*bp == '"') {
  24167. +         for (vec[i] = ++bp; *bp != '\0' && *bp != '"'; bp++)
  24168. +         if (*bp == '\\') {
  24169. +             switch (*++bp) {
  24170. +             case 'n':
  24171. +                 (void) strcpy (bp, bp + 1);
  24172. +                 *--bp = '\n';
  24173. +                 break;
  24174. +             case '\\':
  24175. +             case '"':
  24176. +                 (void) strcpy (bp - 1, bp);
  24177. +                 /* and fall... */
  24178. +             default:
  24179. +                 bp--;
  24180. +                 break;
  24181. +             }
  24182. +         }
  24183. +         if (*bp == '"')
  24184. +         *bp++ = '\0';
  24185. +         continue;
  24186. +     }
  24187. +     
  24188.       vec[i] = bp;
  24189.       while (!isspace (*bp))
  24190.           bp++;
  24191. ***************
  24192. *** 1415,1425 ****
  24193.       i--;
  24194.       vec[NVEC] = NULL;
  24195.   
  24196. !     if (*bp != NULL) {
  24197.       (void) respond (NOTOK, "too many arguments");
  24198.       return NULL;
  24199.       }
  24200. !     if (*vec[0] == NULL) {
  24201.       (void) respond (NOTOK, "null command");
  24202.       return NULL;
  24203.       }
  24204. --- 1717,1727 ----
  24205.       i--;
  24206.       vec[NVEC] = NULL;
  24207.   
  24208. !     if (*bp != 0) {
  24209.       (void) respond (NOTOK, "too many arguments");
  24210.       return NULL;
  24211.       }
  24212. !     if (*vec[0] == 0) {
  24213.       (void) respond (NOTOK, "null command");
  24214.       return NULL;
  24215.       }
  24216. ***************
  24217. *** 1531,1539 ****
  24218.       return NOTOK;
  24219.       if (c == EOF && p == s)
  24220.       return DONE;
  24221. !     *p++ = NULL;
  24222. !     if (debug)
  24223.       padvise (NULLCP, LOG_DEBUG, "<--- %s", s);
  24224.   
  24225.       return OK;
  24226.   }
  24227. --- 1833,1847 ----
  24228.       return NOTOK;
  24229.       if (c == EOF && p == s)
  24230.       return DONE;
  24231. !     if (debug) {
  24232. !     if (*--p == '\n')
  24233. !         *p = 0;
  24234.       padvise (NULLCP, LOG_DEBUG, "<--- %s", s);
  24235. +     if (*p == 0)
  24236. +         *p = '\n';
  24237. +     p++;
  24238. +     }
  24239. +     *p++ = 0;
  24240.   
  24241.       return OK;
  24242.   }
  24243. ***************
  24244. *** 1645,1652 ****
  24245.   {
  24246.       register int    len,
  24247.                       size;
  24248. -     long    ld1,
  24249. -             ld2;
  24250.       register char  *bp;
  24251.       char    buffer[BUFSIZ];
  24252.       register struct drop   *cp,
  24253. --- 1953,1958 ----
  24254. ***************
  24255. *** 1654,1659 ****
  24256. --- 1960,1971 ----
  24257.                              *ep,
  24258.                              *pp;
  24259.   
  24260. + /* MTR: tsk, tsk, tsk... */
  24261. +     (void) fseek (fp, pos, 0);
  24262. +     if (fgets (buffer, sizeof buffer, fp)
  24263. +         && strcmp (buffer, mmdlm1) == 0)
  24264. +     return mbx_read (fp, pos, drops, noisy);
  24265.       /* get drop storage */
  24266.       pp = (struct drop  *) calloc ((unsigned) (len = MAXFOLDER), sizeof *dp);
  24267.   
  24268. ***************
  24269. *** 1666,1675 ****
  24270.           admonish (NULLCP, "unable to allocate drop storage");
  24271.       return NOTOK;
  24272.       }
  24273. -     /* get sizes of msg delimiters */
  24274. -     ld1 = (long) strlen (mmdlm1);
  24275. -     ld2 = (long) strlen (mmdlm2);
  24276.   
  24277.       /* rewind drop file */
  24278.       (void) fseek (fp, pos, 0);
  24279. --- 1978,1983 ----
  24280. *** ../mh-6.7.2/support/pop/popwrd.c    Thu Apr  5 16:02:50 1990
  24281. --- support/pop/popwrd.c    Mon Dec 14 16:20:56 1992
  24282. ***************
  24283. *** 1,7 ****
  24284.   /* popwrd.c - set password for a POP subscriber */
  24285.   #ifndef    lint
  24286. ! static char ident[] = "@(#)$Id: popwrd.c,v 1.5 90/04/05 15:34:47 sources Exp $";
  24287. ! #endif    lint
  24288.   
  24289.   #include "../h/strings.h"
  24290.   #include "../zotnet/bboards.h"
  24291. --- 1,7 ----
  24292.   /* popwrd.c - set password for a POP subscriber */
  24293.   #ifndef    lint
  24294. ! static char ident[] = "@(#)$Id: popwrd.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  24295. ! #endif    /* lint */
  24296.   
  24297.   #include "../h/strings.h"
  24298.   #include "../zotnet/bboards.h"
  24299. ***************
  24300. *** 13,20 ****
  24301.   #include <sys/file.h>
  24302.   #ifdef    SYS5
  24303.   #include <fcntl.h>
  24304. ! #endif    SYS5
  24305.   
  24306.   
  24307.   static char  temp[] = "ptmp";
  24308.   static char  home[BUFSIZ];
  24309. --- 13,25 ----
  24310.   #include <sys/file.h>
  24311.   #ifdef    SYS5
  24312.   #include <fcntl.h>
  24313. ! #endif    /* SYS5 */
  24314.   
  24315. + #ifndef    __STDC__
  24316. + #ifdef    SYS5
  24317. + struct passwd *getpwnam();
  24318. + #endif
  24319. + #endif
  24320.   
  24321.   static char  temp[] = "ptmp";
  24322.   static char  home[BUFSIZ];
  24323. ***************
  24324. *** 85,91 ****
  24325.   
  24326.   #ifdef    lint
  24327.       flags = 0;
  24328. ! #endif    lint
  24329.       for (insist = 0; insist < 2; insist++) {
  24330.       if (insist)
  24331.           printf ("Please use %s.\n",
  24332. --- 90,96 ----
  24333.   
  24334.   #ifdef    lint
  24335.       flags = 0;
  24336. ! #endif    /* lint */
  24337.       for (insist = 0; insist < 2; insist++) {
  24338.       if (insist)
  24339.           printf ("Please use %s.\n",
  24340. ***************
  24341. *** 155,161 ****
  24342.   
  24343.   #ifdef    SIGTSTP
  24344.       (void) signal (SIGTSTP, SIG_IGN);
  24345. ! #endif    SIGTSTP
  24346.       if ((fp = fdopen (fd, "w")) == NULL) {
  24347.       fprintf (stderr, "fdopen loses.\n");
  24348.       (void) unlink (temp);
  24349. --- 160,166 ----
  24350.   
  24351.   #ifdef    SIGTSTP
  24352.       (void) signal (SIGTSTP, SIG_IGN);
  24353. ! #endif    /* SIGTSTP */
  24354.       if ((fp = fdopen (fd, "w")) == NULL) {
  24355.       fprintf (stderr, "fdopen loses.\n");
  24356.       (void) unlink (temp);
  24357. *** ../mh-6.7.2/support/pop/syslog.c    Thu Apr  5 16:02:51 1990
  24358. --- support/pop/syslog.c    Mon Dec 14 16:20:57 1992
  24359. ***************
  24360. *** 3,10 ****
  24361.   static char SccsId[] =    "@(#)syslog.c    4.1 (Berkeley) 5/27/83";
  24362.   #endif
  24363.   #ifndef    lint
  24364. ! static char ident[] = "@(#)$Id: syslog.c,v 1.5 90/04/05 15:34:53 sources Exp $";
  24365. ! #endif    lint
  24366.   
  24367.   /*
  24368.    * SYSLOG -- print message on log file
  24369. --- 3,10 ----
  24370.   static char SccsId[] =    "@(#)syslog.c    4.1 (Berkeley) 5/27/83";
  24371.   #endif
  24372.   #ifndef    lint
  24373. ! static char ident[] = "@(#)$Id: syslog.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  24374. ! #endif    /* lint */
  24375.   
  24376.   /*
  24377.    * SYSLOG -- print message on log file
  24378. ***************
  24379. *** 27,33 ****
  24380. --- 27,35 ----
  24381.   
  24382.   #define    MAXLINE    1024        /* max message size */
  24383.   #define BUFSLOP    20        /* space to allow for "extra stuff" */
  24384. + #ifndef NULL
  24385.   #define NULL    0        /* manifest */
  24386. + #endif
  24387.   
  24388.   #define LOG_COOLIT    LOG_LOCAL0    /* local syslog code */
  24389.   #define LOG_DGRAM    LOG_LOCAL1    /* idem */
  24390. ***************
  24391. *** 34,44 ****
  24392.   
  24393.   #ifndef    LOG_HOST
  24394.   #define LOG_HOST    "localhost"    /* host where syslogd is running */
  24395. ! #endif    LOG_HOST
  24396.   
  24397.   int    LogFile = -1;        /* fd for log */
  24398.   int    LogStat    = 0;        /* status bits, set by initlog */
  24399. ! char    *LogTag = NULL;        /* string to tag the entry with */
  24400.   int    LogMask = LOG_DEBUG;    /* lowest priority to be logged */
  24401.   
  24402.   struct sockaddr_in SyslogAddr;
  24403. --- 36,46 ----
  24404.   
  24405.   #ifndef    LOG_HOST
  24406.   #define LOG_HOST    "localhost"    /* host where syslogd is running */
  24407. ! #endif    /* LOG_HOST */
  24408.   
  24409.   int    LogFile = -1;        /* fd for log */
  24410.   int    LogStat    = 0;        /* status bits, set by initlog */
  24411. ! char    *LogTag = (char *)NULL;    /* string to tag the entry with */
  24412.   int    LogMask = LOG_DEBUG;    /* lowest priority to be logged */
  24413.   
  24414.   struct sockaddr_in SyslogAddr;
  24415. ***************
  24416. *** 81,91 ****
  24417.               }
  24418.               c = *f++;
  24419.               if (c != 'm') {
  24420. ! #ifndef    UCI
  24421.                   *b++ = '%', *b++ = c, *b++ = '\0';
  24422. ! #else    UCI
  24423.                   *b++ = '%', *b++ = c;
  24424. ! #endif    UCI
  24425.                   continue;
  24426.               }
  24427.               if ((unsigned)errno > sys_nerr)
  24428. --- 83,93 ----
  24429.               }
  24430.               c = *f++;
  24431.               if (c != 'm') {
  24432. ! #ifndef    notdef
  24433.                   *b++ = '%', *b++ = c, *b++ = '\0';
  24434. ! #else
  24435.                   *b++ = '%', *b++ = c;
  24436. ! #endif
  24437.                   continue;
  24438.               }
  24439.               if ((unsigned)errno > sys_nerr)
  24440. ***************
  24441. *** 158,161 ****
  24442.       (void) close(LogFile);
  24443.       LogFile = -1;
  24444.   }
  24445. ! #endif    not BSD43
  24446. --- 160,163 ----
  24447.       (void) close(LogFile);
  24448.       LogFile = -1;
  24449.   }
  24450. ! #endif    /* not BSD43 */
  24451. *** ../mh-6.7.2/uip/ali.c    Thu Apr  5 16:03:56 1990
  24452. --- uip/ali.c    Mon Dec 14 16:20:58 1992
  24453. ***************
  24454. *** 1,12 ****
  24455.   /* ali.c - the new ali */
  24456.   #ifndef    lint
  24457. ! static char ident[] = "@(#)$Id: ali.c,v 1.3 90/04/05 15:03:38 sources Exp $";
  24458. ! #endif    lint
  24459.   
  24460.   #include "../h/mh.h"
  24461.   #include "../h/addrsbr.h"
  24462.   #include "../h/aliasbr.h"
  24463.   #include <stdio.h>
  24464.   
  24465.   
  24466.   #define    NVEC    50        /* maximum number of names */
  24467. --- 1,15 ----
  24468.   /* ali.c - the new ali */
  24469.   #ifndef    lint
  24470. ! static char ident[] = "@(#)$Id: ali.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  24471. ! #endif    /* lint */
  24472.   
  24473.   #include "../h/mh.h"
  24474.   #include "../h/addrsbr.h"
  24475.   #include "../h/aliasbr.h"
  24476.   #include <stdio.h>
  24477. + #ifdef LOCALE
  24478. + #include    <locale.h>
  24479. + #endif
  24480.   
  24481.   
  24482.   #define    NVEC    50        /* maximum number of names */
  24483. ***************
  24484. *** 37,43 ****
  24485.   #define    HELPSW    8
  24486.       "help", 4,
  24487.   
  24488. !     NULL, NULL
  24489.   };
  24490.   
  24491.   /*   */
  24492. --- 40,46 ----
  24493.   #define    HELPSW    8
  24494.       "help", 4,
  24495.   
  24496. !     NULL, 0
  24497.   };
  24498.   
  24499.   /*   */
  24500. ***************
  24501. *** 68,73 ****
  24502. --- 71,79 ----
  24503.              *arguments[MAXARGS];
  24504.       struct aka *ak;
  24505.   
  24506. + #ifdef LOCALE
  24507. +     setlocale(LC_ALL, "");
  24508. + #endif
  24509.       invo_name = r1bindex (argv[0], '/');
  24510.       mts_init (invo_name);
  24511.       if ((cp = m_find (invo_name)) != NULL) {
  24512. ***************
  24513. *** 132,140 ****
  24514.   
  24515.       if (!noalias) {
  24516.       (void) alias (AliasFile);
  24517. !     if (cp = m_find ("Aliasfile"))    /* allow Aliasfile: profile entry */
  24518. !         if ((i = alias (cp)) != AK_OK)
  24519. !         adios (NULLCP, "aliasing error in %s - %s", cp, akerror (i));
  24520.       }
  24521.       
  24522.   
  24523. --- 138,153 ----
  24524.   
  24525.       if (!noalias) {
  24526.       (void) alias (AliasFile);
  24527. !     if (cp = m_find ("Aliasfile")) { /* allow Aliasfile: profile entry */
  24528. !         char *dp = NULL;
  24529. !         for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++)
  24530. !         if ((i = alias (*ap)) != AK_OK)
  24531. !             adios (NULLCP,
  24532. !                 "aliasing error in %s - %s", *ap, akerror (i));
  24533. !         if (dp)
  24534. !         free(dp);
  24535. !     }
  24536.       }
  24537.       
  24538.   
  24539. ***************
  24540. *** 148,154 ****
  24541.           print_aka (akvalue (vec[i]), list, 0);
  24542.       else {
  24543.       if (inverted)
  24544. !         adios (NULLCP, "usage: %s addresses ...  (you forgot the addresses)",
  24545.           invo_name);
  24546.   
  24547.       for (ak = akahead; ak; ak = ak -> ak_next) {
  24548. --- 161,168 ----
  24549.           print_aka (akvalue (vec[i]), list, 0);
  24550.       else {
  24551.       if (inverted)
  24552. !         adios (NULLCP,
  24553. !             "usage: %s -user addresses ...  (you forgot the addresses)",
  24554.           invo_name);
  24555.   
  24556.       for (ak = akahead; ak; ak = ak -> ak_next) {
  24557. ***************
  24558. *** 191,197 ****
  24559.                   pos += 2;
  24560.               }
  24561.   
  24562. !         case NULL: 
  24563.           break;
  24564.   
  24565.           default: 
  24566. --- 205,211 ----
  24567.                   pos += 2;
  24568.               }
  24569.   
  24570. !         case 0: 
  24571.           break;
  24572.   
  24573.           default: 
  24574. ***************
  24575. *** 244,251 ****
  24576. --- 258,269 ----
  24577.       }
  24578.       mnfree (mp);
  24579.   
  24580. + #ifdef    notdef
  24581.       printf ("%s: ", s);
  24582.       print_aka (vp ? vp : s, list, pos += strlen (s) + 1);
  24583. + #else
  24584. +     print_aka (vp ? vp : s, list, 0);
  24585. + #endif
  24586.       if (vp)
  24587.       free (vp);
  24588.   }
  24589. *** ../mh-6.7.2/uip/aliasbr.c    Thu Apr  5 16:03:33 1990
  24590. --- uip/aliasbr.c    Mon Dec 14 16:20:59 1992
  24591. ***************
  24592. *** 1,7 ****
  24593.   /* aliasbr.c - new aliasing mechanism */
  24594.   #ifndef    lint
  24595. ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.7 90/04/05 14:59:03 sources Exp $";
  24596. ! #endif    lint
  24597.   
  24598.   #include "../h/mh.h"
  24599.   #include "../h/aliasbr.h"
  24600. --- 1,7 ----
  24601.   /* aliasbr.c - new aliasing mechanism */
  24602.   #ifndef    lint
  24603. ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
  24604. ! #endif    /* lint */
  24605.   
  24606.   #include "../h/mh.h"
  24607.   #include "../h/aliasbr.h"
  24608. ***************
  24609. *** 26,33 ****
  24610. --- 26,37 ----
  24611.   static        add_aka();
  24612.   static int    aleq(), addfile(), addgroup(), addmember(), addall();
  24613.   
  24614. + #ifndef    __STDC__
  24615. + #ifdef    SYS5
  24616.   struct passwd  *getpwent ();
  24617.   struct group   *getgrnam (), *getgrgid ();
  24618. + #endif
  24619. + #endif
  24620.   
  24621.   /*   */
  24622.   
  24623. ***************
  24624. *** 110,116 ****
  24625.           else
  24626.           aliasent++;
  24627.   
  24628. !     return (*aliasent == NULL || *aliasent == '*');
  24629.   }
  24630.   
  24631.   /*   */
  24632. --- 114,120 ----
  24633.           else
  24634.           aliasent++;
  24635.   
  24636. !     return (*aliasent == 0 || *aliasent == '*');
  24637.   }
  24638.   
  24639.   /*   */
  24640. ***************
  24641. *** 152,158 ****
  24642.           case ':':         /* comment */
  24643.           case ';': 
  24644.           case '#':
  24645. !         case NULL: 
  24646.           continue;
  24647.       }
  24648.   
  24649. --- 156,162 ----
  24650.           case ':':         /* comment */
  24651.           case ';': 
  24652.           case '#':
  24653. !         case 0: 
  24654.           continue;
  24655.       }
  24656.   
  24657. ***************
  24658. *** 180,186 ****
  24659.       }
  24660.   
  24661.       switch (*(pp = scanp (ap))) {
  24662. !         case NULL:         /* EOL */
  24663.           (void) fclose (fp);
  24664.           return AK_ERROR;
  24665.   
  24666. --- 184,190 ----
  24667.       }
  24668.   
  24669.       switch (*(pp = scanp (ap))) {
  24670. !         case 0:         /* EOL */
  24671.           (void) fclose (fp);
  24672.           return AK_ERROR;
  24673.   
  24674. ***************
  24675. *** 283,289 ****
  24676.       p = cp;
  24677.       while (!isspace (*cp) && *cp)
  24678.       cp++;
  24679. !     *cp = NULL;
  24680.   
  24681.       return p;
  24682.   }
  24683. --- 287,293 ----
  24684.       p = cp;
  24685.       while (!isspace (*cp) && *cp)
  24686.       cp++;
  24687. !     *cp = 0;
  24688.   
  24689.       return p;
  24690.   }
  24691. ***************
  24692. *** 300,306 ****
  24693.       while (!isspace (*cp) && *cp && *cp != ':' && *cp != ';')
  24694.       cp++;
  24695.       *c = *cp;
  24696. !     *cp++ = NULL;
  24697.       *a = cp;
  24698.   
  24699.       return p;
  24700. --- 304,310 ----
  24701.       while (!isspace (*cp) && *cp && *cp != ':' && *cp != ';')
  24702.       cp++;
  24703.       *c = *cp;
  24704. !     *cp++ = 0;
  24705.       *a = cp;
  24706.   
  24707.       return p;
  24708. ***************
  24709. *** 318,324 ****
  24710.   
  24711.       if ((fp = fopen (libpath (file), "r")) == NULL) {
  24712.       akerrst = file;
  24713. !     return NULL;
  24714.       }
  24715.   
  24716.       while (fgets (buffer, sizeof buffer, fp) != NULL)
  24717. --- 322,328 ----
  24718.   
  24719.       if ((fp = fopen (libpath (file), "r")) == NULL) {
  24720.       akerrst = file;
  24721. !     return 0;
  24722.       }
  24723.   
  24724.       while (fgets (buffer, sizeof buffer, fp) != NULL)
  24725. ***************
  24726. *** 343,367 ****
  24727.       gr = getgrgid (atoi (grp));
  24728.       if (!gr) {
  24729.       akerrst = grp;
  24730. !     return NULL;
  24731.       }
  24732.   
  24733. ! #ifndef DBM
  24734.       if (homehead == NULL)
  24735.       init_pw ();
  24736. ! #endif /* DBM */
  24737.   
  24738.       while (gp = *gr -> gr_mem++)
  24739. ! #ifdef DBM
  24740.       {
  24741.       struct passwd *pw;
  24742. ! #endif /* DBM */
  24743.       for (hm = homehead; hm; hm = hm -> h_next)
  24744.           if (!strcmp (hm -> h_name, gp)) {
  24745.           add_aka (ak, hm -> h_name);
  24746.           break;
  24747.           }
  24748. ! #ifdef DBM
  24749.           if (pw = getpwnam(gp))
  24750.       {
  24751.           hmalloc(pw);
  24752. --- 347,371 ----
  24753.       gr = getgrgid (atoi (grp));
  24754.       if (!gr) {
  24755.       akerrst = grp;
  24756. !     return 0;
  24757.       }
  24758.   
  24759. ! #ifndef DBMPWD
  24760.       if (homehead == NULL)
  24761.       init_pw ();
  24762. ! #endif /* DBMPWD */
  24763.   
  24764.       while (gp = *gr -> gr_mem++)
  24765. ! #ifdef DBMPWD
  24766.       {
  24767.       struct passwd *pw;
  24768. ! #endif /* DBMPWD */
  24769.       for (hm = homehead; hm; hm = hm -> h_next)
  24770.           if (!strcmp (hm -> h_name, gp)) {
  24771.           add_aka (ak, hm -> h_name);
  24772.           break;
  24773.           }
  24774. ! #ifdef DBMPWD
  24775.           if (pw = getpwnam(gp))
  24776.       {
  24777.           hmalloc(pw);
  24778. ***************
  24779. *** 368,374 ****
  24780.           add_aka (ak, gp);
  24781.       }
  24782.       }
  24783. ! #endif /* DBM */
  24784.   
  24785.       return 1;
  24786.   }
  24787. --- 372,378 ----
  24788.           add_aka (ak, gp);
  24789.       }
  24790.       }
  24791. ! #endif /* DBMPWD */
  24792.   
  24793.       return 1;
  24794.   }
  24795. ***************
  24796. *** 391,402 ****
  24797.       }
  24798.       if (!gr) {
  24799.       akerrst = grp;
  24800. !     return NULL;
  24801.       }
  24802.   
  24803. ! #ifndef DBM
  24804.       if (homehead == NULL)
  24805. ! #endif /* DBM */
  24806.       init_pw ();
  24807.   
  24808.       for (hm = homehead; hm; hm = hm -> h_next)
  24809. --- 395,406 ----
  24810.       }
  24811.       if (!gr) {
  24812.       akerrst = grp;
  24813. !     return 0;
  24814.       }
  24815.   
  24816. ! #ifndef DBMPWD
  24817.       if (homehead == NULL)
  24818. ! #endif /* DBMPWD */
  24819.       init_pw ();
  24820.   
  24821.       for (hm = homehead; hm; hm = hm -> h_next)
  24822. ***************
  24823. *** 411,426 ****
  24824.   static    int addall (ak)
  24825.   register struct aka *ak;
  24826.   {
  24827. !     int     noshell = NoShell == NULLCP || *NoShell == NULL;
  24828.       register struct home   *hm;
  24829.   
  24830. ! #ifndef DBM
  24831.       if (homehead == NULL)
  24832. ! #endif /* DBM */
  24833.       init_pw ();
  24834. - #ifndef DBM
  24835.       if (Everyone < 0)
  24836. - #endif /* DBM */
  24837.       Everyone = EVERYONE;
  24838.   
  24839.       for (hm = homehead; hm; hm = hm -> h_next)
  24840. --- 415,428 ----
  24841.   static    int addall (ak)
  24842.   register struct aka *ak;
  24843.   {
  24844. !     int     noshell = NoShell == NULLCP || *NoShell == 0;
  24845.       register struct home   *hm;
  24846.   
  24847. ! #ifndef DBMPWD
  24848.       if (homehead == NULL)
  24849. ! #endif /* DBMPWD */
  24850.       init_pw ();
  24851.       if (Everyone < 0)
  24852.       Everyone = EVERYONE;
  24853.   
  24854.       for (hm = homehead; hm; hm = hm -> h_next)
  24855. ***************
  24856. *** 443,463 ****
  24857.       if (cp == NULL)
  24858.       cp = addrs;
  24859.       else
  24860. !     if (*cp == NULL)
  24861.           return (cp = NULL);
  24862.   
  24863.       for (pp = cp; isspace (*pp); pp++)
  24864.       continue;
  24865. !     if (*pp == NULL)
  24866.       return (cp = NULL);
  24867. !     for (qp = pp; *qp != NULL && *qp != ','; qp++)
  24868.       continue;
  24869.       if (*qp == ',')
  24870. !     *qp++ = NULL;
  24871.       for (cp = qp, qp--; qp > pp; qp--)
  24872. !     if (*qp != NULL)
  24873.           if (isspace (*qp))
  24874. !         *qp = NULL;
  24875.           else
  24876.           break;
  24877.   
  24878. --- 445,465 ----
  24879.       if (cp == NULL)
  24880.       cp = addrs;
  24881.       else
  24882. !     if (*cp == 0)
  24883.           return (cp = NULL);
  24884.   
  24885.       for (pp = cp; isspace (*pp); pp++)
  24886.       continue;
  24887. !     if (*pp == 0)
  24888.       return (cp = NULL);
  24889. !     for (qp = pp; *qp != 0 && *qp != ','; qp++)
  24890.       continue;
  24891.       if (*qp == ',')
  24892. !     *qp++ = 0;
  24893.       for (cp = qp, qp--; qp > pp; qp--)
  24894. !     if (*qp != 0)
  24895.           if (isspace (*qp))
  24896. !         *qp = 0;
  24897.           else
  24898.           break;
  24899.   
  24900. ***************
  24901. *** 492,498 ****
  24902.   
  24903.   init_pw () {
  24904.       register struct passwd  *pw;
  24905. ! #ifdef DBM
  24906.       static int       init;
  24907.     
  24908.       if (!init)
  24909. --- 494,500 ----
  24910.   
  24911.   init_pw () {
  24912.       register struct passwd  *pw;
  24913. ! #ifdef DBMPWD
  24914.       static int       init;
  24915.     
  24916.       if (!init)
  24917. ***************
  24918. *** 502,508 ****
  24919.           homehead=NULL;
  24920.           hometail=NULL;
  24921.           init++;
  24922. ! #endif /* DBM */
  24923.   
  24924.       (void) setpwent ();
  24925.   
  24926. --- 504,510 ----
  24927.           homehead=NULL;
  24928.           hometail=NULL;
  24929.           init++;
  24930. ! #endif /* DBMPWD */
  24931.   
  24932.       (void) setpwent ();
  24933.   
  24934. ***************
  24935. *** 511,519 ****
  24936.           break;
  24937.   
  24938.       (void) endpwent ();
  24939. ! #ifdef DBM
  24940.       }
  24941. ! #endif /* DBM */
  24942.   }
  24943.   
  24944.   /*   */
  24945. --- 513,521 ----
  24946.           break;
  24947.   
  24948.       (void) endpwent ();
  24949. ! #ifdef DBMPWD
  24950.       }
  24951. ! #endif /* DBMPWD */
  24952.   }
  24953.   
  24954.   /*   */
  24955. ***************
  24956. *** 555,561 ****
  24957.       p -> h_shell = getcpy (pw -> pw_shell);
  24958.   #ifdef    BSD42
  24959.       p -> h_ngrps = 0;
  24960. ! #endif    BSD42
  24961.       p -> h_next = NULL;
  24962.       if (hometail != NULL)
  24963.       hometail -> h_next = p;
  24964. --- 557,563 ----
  24965.       p -> h_shell = getcpy (pw -> pw_shell);
  24966.   #ifdef    BSD42
  24967.       p -> h_ngrps = 0;
  24968. ! #endif    /* BSD42 */
  24969.       p -> h_next = NULL;
  24970.       if (hometail != NULL)
  24971.       hometail -> h_next = p;
  24972. ***************
  24973. *** 573,596 ****
  24974.   register char   *name;
  24975.   {
  24976.       register struct home *hp;
  24977. ! #ifdef DBM
  24978.       struct passwd *pw;
  24979.       char lname[32];
  24980.       char *c,*c1;
  24981. ! #else  /* DBM */
  24982.   
  24983.       if (homehead == NULL)
  24984.       init_pw ();
  24985. ! #endif /* DBM */
  24986.   
  24987.       for (hp = homehead; hp; hp = hp -> h_next)
  24988.       if (uleq (name, hp -> h_name))
  24989.           return hp;
  24990.   
  24991. ! #ifdef DBM       /* The only place where there might be problems */
  24992.                   /* This assumes that ALL usernames are kept in lowercase */
  24993.       for (c = name,c1 = lname; *c; c++, c1++)
  24994. !         if (isupper(*c))
  24995.           *c1 = tolower(*c);
  24996.       else
  24997.           *c1 = *c;
  24998. --- 575,598 ----
  24999.   register char   *name;
  25000.   {
  25001.       register struct home *hp;
  25002. ! #ifdef DBMPWD
  25003.       struct passwd *pw;
  25004.       char lname[32];
  25005.       char *c,*c1;
  25006. ! #else  /* DBMPWD */
  25007.   
  25008.       if (homehead == NULL)
  25009.       init_pw ();
  25010. ! #endif /* DBMPWD */
  25011.   
  25012.       for (hp = homehead; hp; hp = hp -> h_next)
  25013.       if (uleq (name, hp -> h_name))
  25014.           return hp;
  25015.   
  25016. ! #ifdef DBMPWD       /* The only place where there might be problems */
  25017.                   /* This assumes that ALL usernames are kept in lowercase */
  25018.       for (c = name,c1 = lname; *c; c++, c1++)
  25019. !         if (isalpha(*c) && isupper(*c))
  25020.           *c1 = tolower(*c);
  25021.       else
  25022.           *c1 = *c;
  25023. ***************
  25024. *** 597,604 ****
  25025.       *c1 = NULL;
  25026.       if (pw = getpwnam(lname))
  25027.       return(hmalloc(pw));
  25028. ! #endif /* DBM */
  25029.       
  25030.       return NULL;
  25031.   }
  25032. ! #endif    MMDFMTS
  25033. --- 599,606 ----
  25034.       *c1 = NULL;
  25035.       if (pw = getpwnam(lname))
  25036.       return(hmalloc(pw));
  25037. ! #endif /* DBMPWD */
  25038.       
  25039.       return NULL;
  25040.   }
  25041. ! #endif    /* MMDFMTS */
  25042. *** ../mh-6.7.2/uip/anno.c    Thu Apr  5 16:02:54 1990
  25043. --- uip/anno.c    Mon Dec 14 16:20:59 1992
  25044. ***************
  25045. *** 1,11 ****
  25046.   /* anno.c - annotate messages */
  25047.   #ifndef    lint
  25048. ! static char ident[] = "@(#)$Id: anno.c,v 2.3 90/04/05 15:35:14 sources Exp $";
  25049. ! #endif    lint
  25050.   
  25051.   #include "../h/mh.h"
  25052.   #include <ctype.h>
  25053.   #include <stdio.h>
  25054.   
  25055.   static make_comp();
  25056.   /*   */
  25057. --- 1,14 ----
  25058.   /* anno.c - annotate messages */
  25059.   #ifndef    lint
  25060. ! static char ident[] = "@(#)$Id: anno.c,v 2.6 1992/12/15 00:20:22 jromine Exp $";
  25061. ! #endif    /* lint */
  25062.   
  25063.   #include "../h/mh.h"
  25064.   #include <ctype.h>
  25065.   #include <stdio.h>
  25066. + #ifdef LOCALE
  25067. + #include    <locale.h>
  25068. + #endif
  25069.   
  25070.   static make_comp();
  25071.   /*   */
  25072. ***************
  25073. *** 30,36 ****
  25074.   #define    HELPSW    6
  25075.       "help", 4,
  25076.   
  25077. !     NULL, NULL
  25078.   };
  25079.   
  25080.   /*   */
  25081. --- 33,39 ----
  25082.   #define    HELPSW    6
  25083.       "help", 4,
  25084.   
  25085. !     NULL, 0
  25086.   };
  25087.   
  25088.   /*   */
  25089. ***************
  25090. *** 57,62 ****
  25091. --- 60,68 ----
  25092.              *msgs[MAXARGS];
  25093.       struct msgs *mp;
  25094.   
  25095. + #ifdef LOCALE
  25096. +     setlocale(LC_ALL, "");
  25097. + #endif
  25098.       invo_name = r1bindex (argv[0], '/');
  25099.       if ((cp = m_find (invo_name)) != NULL) {
  25100.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  25101. ***************
  25102. *** 123,129 ****
  25103.   #ifdef UCI
  25104.       if (strcmp(invo_name, "fanno") == 0)    /* ugh! */
  25105.       datesw = 0;
  25106. ! #endif UCI
  25107.   
  25108.   /*   */
  25109.   
  25110. --- 129,135 ----
  25111.   #ifdef UCI
  25112.       if (strcmp(invo_name, "fanno") == 0)    /* ugh! */
  25113.       datesw = 0;
  25114. ! #endif    /* UCI */
  25115.   
  25116.   /*   */
  25117.   
  25118. ***************
  25119. *** 179,185 ****
  25120.       }
  25121.   
  25122.       if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
  25123. !     *cp = NULL;
  25124.       if (strlen (*ap) == 0)
  25125.       adios (NULLCP, "null component name");
  25126.       if (**ap == '-')
  25127. --- 185,191 ----
  25128.       }
  25129.   
  25130.       if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
  25131. !     *cp = 0;
  25132.       if (strlen (*ap) == 0)
  25133.       adios (NULLCP, "null component name");
  25134.       if (**ap == '-')
  25135. *** ../mh-6.7.2/uip/annosbr.c    Thu Apr  5 16:02:53 1990
  25136. --- uip/annosbr.c    Mon Dec 14 16:21:00 1992
  25137. ***************
  25138. *** 1,7 ****
  25139.   /* annosbr.c - prepend annotation to messages */
  25140.   #ifndef    lint
  25141. ! static char ident[] = "@(#)$Id: annosbr.c,v 2.4 90/04/05 15:35:09 sources Exp $";
  25142. ! #endif    lint
  25143.   
  25144.   #include "../h/mh.h"
  25145.   #include "../zotnet/tws.h"
  25146. --- 1,7 ----
  25147.   /* annosbr.c - prepend annotation to messages */
  25148.   #ifndef    lint
  25149. ! static char ident[] = "@(#)$Id: annosbr.c,v 2.5 1992/12/15 00:20:22 jromine Exp $";
  25150. ! #endif    /* lint */
  25151.   
  25152.   #include "../h/mh.h"
  25153.   #include "../zotnet/tws.h"
  25154. *** ../mh-6.7.2/uip/ap.c    Thu Apr  5 16:03:39 1990
  25155. --- uip/ap.c    Mon Dec 14 16:21:01 1992
  25156. ***************
  25157. *** 1,12 ****
  25158.   /* ap.c - parse addresses 822-style */
  25159.   #ifndef    lint
  25160. ! static char ident[] = "@(#)$Id: ap.c,v 1.3 90/04/05 15:00:32 sources Exp $";
  25161. ! #endif    lint
  25162.   
  25163.   #include "../h/mh.h"
  25164.   #include "../h/addrsbr.h"
  25165.   #include "../h/formatsbr.h"
  25166.   #include <stdio.h>
  25167.   
  25168.   
  25169.   #define    NADDRS    100
  25170. --- 1,15 ----
  25171.   /* ap.c - parse addresses 822-style */
  25172.   #ifndef    lint
  25173. ! static char ident[] = "@(#)$Id: ap.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  25174. ! #endif    /* lint */
  25175.   
  25176.   #include "../h/mh.h"
  25177.   #include "../h/addrsbr.h"
  25178.   #include "../h/formatsbr.h"
  25179.   #include <stdio.h>
  25180. + #ifdef LOCALE
  25181. + #include    <locale.h>
  25182. + #endif
  25183.   
  25184.   
  25185.   #define    NADDRS    100
  25186. ***************
  25187. *** 35,41 ****
  25188.   #define    HELPSW    5
  25189.       "help", 4,
  25190.   
  25191. !     NULL, NULL
  25192.   };
  25193.   
  25194.   /*   */
  25195. --- 38,44 ----
  25196.   #define    HELPSW    5
  25197.       "help", 4,
  25198.   
  25199. !     NULL, 0
  25200.   };
  25201.   
  25202.   /*   */
  25203. ***************
  25204. *** 42,48 ****
  25205.   
  25206.   static struct format *fmt;
  25207.   
  25208. ! static int dat[4];
  25209.   
  25210.   static int    process();
  25211.   /*   */
  25212. --- 45,51 ----
  25213.   
  25214.   static struct format *fmt;
  25215.   
  25216. ! static int dat[5];
  25217.   
  25218.   static int    process();
  25219.   /*   */
  25220. ***************
  25221. *** 67,72 ****
  25222. --- 70,78 ----
  25223.          *arguments[MAXARGS],
  25224.              *addrs[NADDRS];
  25225.   
  25226. + #ifdef LOCALE
  25227. +     setlocale(LC_ALL, "");
  25228. + #endif
  25229.       invo_name = r1bindex (argv[0], '/');
  25230.       mts_init (invo_name);
  25231.       if ((cp = m_find (invo_name)) != NULL) {
  25232. ***************
  25233. *** 141,147 ****
  25234.       width = WBUFSIZ;
  25235.       fmt_norm = normalize;
  25236.       (void) fmt_compile (nfs, &fmt);
  25237. !     dat[0] = dat[1] = dat[2] = 0;
  25238.       dat[3] = width;
  25239.   
  25240.       for (addrp = 0; addrs[addrp]; addrp++)
  25241. --- 147,153 ----
  25242.       width = WBUFSIZ;
  25243.       fmt_norm = normalize;
  25244.       (void) fmt_compile (nfs, &fmt);
  25245. !     dat[0] = dat[1] = dat[2] = dat[4] = 0;
  25246.       dat[3] = width;
  25247.   
  25248.       for (addrp = 0; addrs[addrp]; addrp++)
  25249. *** ../mh-6.7.2/uip/bbc.c    Thu Apr  5 16:02:56 1990
  25250. --- uip/bbc.c    Mon Dec 14 09:10:30 1992
  25251. ***************
  25252. *** 1,6 ****
  25253.   /* bbc.c - ZOTnet BBoard checker */
  25254.   #ifndef    lint
  25255. ! static char ident[] = "@(#)$Id: bbc.c,v 2.5 90/04/05 14:56:21 sources Exp $";
  25256.   #endif    lint
  25257.   
  25258.   #include "../h/mh.h"
  25259. --- 1,6 ----
  25260.   /* bbc.c - ZOTnet BBoard checker */
  25261.   #ifndef    lint
  25262. ! static char ident[] = "@(#)$Id: bbc.c,v 2.12 1992/12/14 17:10:25 jromine Exp $";
  25263.   #endif    lint
  25264.   
  25265.   #include "../h/mh.h"
  25266. ***************
  25267. *** 24,29 ****
  25268. --- 24,32 ----
  25269.   #include <sys/time.h>
  25270.   #include <sys/resource.h>
  25271.   #endif    SIGTSTP
  25272. + #ifdef LOCALE
  25273. + #include    <locale.h>
  25274. + #endif
  25275.   
  25276.   #define    RCFILE    ".bbrc"
  25277.   
  25278. ***************
  25279. *** 130,136 ****
  25280.   #ifdef    BPOP
  25281.   extern char response[];
  25282.   
  25283. ! char   *getusr (), **getip ();
  25284.   #endif    BPOP
  25285.   
  25286.   int    sigser (), action ();
  25287. --- 133,140 ----
  25288.   #ifdef    BPOP
  25289.   extern char response[];
  25290.   
  25291. ! extern char   *getusr ();
  25292. ! static char  **getip ();
  25293.   #endif    BPOP
  25294.   
  25295.   int    sigser (), action ();
  25296. ***************
  25297. *** 137,143 ****
  25298.   int    hupser ();
  25299.   #ifdef    SIGTSTP
  25300.   int    tstpid;
  25301. ! int    tstpser ();
  25302.   #endif    SIGTSTP
  25303.   
  25304.   static char *rcfile=NULL;
  25305. --- 141,147 ----
  25306.   int    hupser ();
  25307.   #ifdef    SIGTSTP
  25308.   int    tstpid;
  25309. ! static  int    tstpser ();
  25310.   #endif    SIGTSTP
  25311.   
  25312.   static char *rcfile=NULL;
  25313. ***************
  25314. *** 179,189 ****
  25315.          *bbs[NBB + 1],
  25316.   #endif    UCL
  25317.          *vec[MAXARGS];
  25318.   #ifdef    UCL
  25319.       called_bbc = 1;
  25320.       bbp = 0;
  25321.   #endif    UCL
  25322.       invo_name = r1bindex (argv[0], '/');
  25323.   #ifdef    BPOP
  25324.       mts_init (invo_name);
  25325. --- 183,196 ----
  25326.          *bbs[NBB + 1],
  25327.   #endif    UCL
  25328.          *vec[MAXARGS];
  25329.   #ifdef    UCL
  25330.       called_bbc = 1;
  25331.       bbp = 0;
  25332.   #endif    UCL
  25333. + #ifdef LOCALE
  25334. +     setlocale(LC_ALL, "");
  25335. + #endif
  25336.       invo_name = r1bindex (argv[0], '/');
  25337.   #ifdef    BPOP
  25338.       mts_init (invo_name);
  25339. ***************
  25340. *** 725,731 ****
  25341.       if ((cp = rc ? rc : getenv ("MHBBRC")) && *cp) {
  25342.       rcfile = path (cp, TFILE);
  25343.       if (*cp != '/')
  25344. !         (void) putenv ("MHBBRC", rcfile);
  25345.       }
  25346.       else
  25347.       rcfile = concat (mypath, "/", RCFILE, NULLCP);
  25348. --- 732,738 ----
  25349.       if ((cp = rc ? rc : getenv ("MHBBRC")) && *cp) {
  25350.       rcfile = path (cp, TFILE);
  25351.       if (*cp != '/')
  25352. !         (void) m_putenv ("MHBBRC", rcfile);
  25353.       }
  25354.       else
  25355.       rcfile = concat (mypath, "/", RCFILE, NULLCP);
  25356. ***************
  25357. *** 810,822 ****
  25358. --- 817,837 ----
  25359.   int    sig;
  25360.   {
  25361.       int        pid;
  25362. + #if defined(BSD42) && !defined(WAITINT)
  25363.       union wait w;
  25364. + #else
  25365. +     int    w;
  25366. + #endif
  25367.   
  25368.       rcend ();
  25369.   
  25370. + #ifdef SVR4
  25371. +     waitpid(tstpid, &w, WUNTRACED);
  25372. + #else
  25373.       while ((pid = wait3 (&w, WUNTRACED, (struct rusage *) 0)) != NOTOK
  25374.           && pid != tstpid)
  25375.       continue;
  25376. + #endif
  25377.   
  25378.       (void) signal (SIGTSTP, SIG_DFL);
  25379.   #ifdef    BSD42
  25380. *** ../mh-6.7.2/uip/bbl.c    Thu Apr  5 16:07:44 1990
  25381. --- uip/bbl.c    Tue Nov  3 16:39:27 1992
  25382. ***************
  25383. *** 1,6 ****
  25384.   /* bbl.c - ease the tasks of a BBleader */
  25385.   #ifndef    lint
  25386. ! static char ident[] = "@(#)$Id: bbl.c,v 2.1 90/04/05 14:56:46 sources Exp $";
  25387.   #endif    lint
  25388.   
  25389.   #include "../h/mh.h"
  25390. --- 1,6 ----
  25391.   /* bbl.c - ease the tasks of a BBleader */
  25392.   #ifndef    lint
  25393. ! static char ident[] = "@(#)$Id: bbl.c,v 2.4 1992/11/04 00:39:25 jromine Exp $";
  25394.   #endif    lint
  25395.   
  25396.   #include "../h/mh.h"
  25397. ***************
  25398. *** 9,14 ****
  25399. --- 9,17 ----
  25400.   #include <ctype.h>
  25401.   #include <pwd.h>
  25402.   #include <stdio.h>
  25403. + #ifdef LOCALE
  25404. + #include    <locale.h>
  25405. + #endif
  25406.   
  25407.   /*   */
  25408.   
  25409. ***************
  25410. *** 50,58 ****
  25411.   static    struct bboard  *bb = NULL;
  25412.   
  25413.   
  25414.   #ifdef    SYS5
  25415.   struct    passwd    *getpwnam (), *getpwuid ();
  25416. ! #endif    SYS5
  25417.   
  25418.   /*   */
  25419.   
  25420. --- 53,63 ----
  25421.   static    struct bboard  *bb = NULL;
  25422.   
  25423.   
  25424. + #ifndef    __STDC__
  25425.   #ifdef    SYS5
  25426.   struct    passwd    *getpwnam (), *getpwuid ();
  25427. ! #endif    /* SYS5 */
  25428. ! #endif
  25429.   
  25430.   /*   */
  25431.   
  25432. ***************
  25433. *** 69,74 ****
  25434. --- 74,82 ----
  25435.              *arguments[MAXARGS];
  25436.       struct passwd  *pw;
  25437.   
  25438. + #ifdef LOCALE
  25439. +     setlocale(LC_ALL, "");
  25440. + #endif
  25441.       invo_name = r1bindex (argv[0], '/');
  25442.       if ((cp = m_find (invo_name)) != NULL) {
  25443.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  25444. ***************
  25445. *** 90,96 ****
  25446.       if (pw -> pw_uid != geteuid ())
  25447.       adios (NULLCP, "not running setuid to %s", bboards);
  25448.   
  25449. !     current_folder = (cp = m_find (pfolder)) ? getcpy (cp) : defalt;
  25450.   
  25451.   /*   */
  25452.   
  25453. --- 98,105 ----
  25454.       if (pw -> pw_uid != geteuid ())
  25455.       adios (NULLCP, "not running setuid to %s", bboards);
  25456.   
  25457. !     current_folder = ((cp = m_find (pfolder)) || (cp = m_find (inbox)))
  25458. !         ? getcpy (cp) : defalt;
  25459.   
  25460.   /*   */
  25461.   
  25462. *** ../mh-6.7.2/uip/burst.c    Thu Apr  5 16:03:40 1990
  25463. --- uip/burst.c    Mon Dec 14 16:21:01 1992
  25464. ***************
  25465. *** 1,12 ****
  25466.   /* burst.c - explode digests into individual messages */
  25467.   #ifndef    lint
  25468. ! static char ident[] = "@(#)$Id: burst.c,v 1.3 90/04/05 15:00:42 sources Exp $";
  25469. ! #endif    lint
  25470.   
  25471.   #include "../h/mh.h"
  25472.   #include <stdio.h>
  25473.   #include <sys/types.h>
  25474.   #include <sys/stat.h>
  25475.   
  25476.   static    cpybrst(), burst();
  25477.   /*   */
  25478. --- 1,15 ----
  25479.   /* burst.c - explode digests into individual messages */
  25480.   #ifndef    lint
  25481. ! static char ident[] = "@(#)$Id: burst.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  25482. ! #endif    /* lint */
  25483.   
  25484.   #include "../h/mh.h"
  25485.   #include <stdio.h>
  25486.   #include <sys/types.h>
  25487.   #include <sys/stat.h>
  25488. + #ifdef LOCALE
  25489. + #include    <locale.h>
  25490. + #endif
  25491.   
  25492.   static    cpybrst(), burst();
  25493.   /*   */
  25494. ***************
  25495. *** 30,36 ****
  25496.   #define    HELPSW    6
  25497.       "help", 4,
  25498.   
  25499. !     NULL, NULL
  25500.   };
  25501.   
  25502.   /*   */
  25503. --- 33,39 ----
  25504.   #define    HELPSW    6
  25505.       "help", 4,
  25506.   
  25507. !     NULL, 0
  25508.   };
  25509.   
  25510.   /*   */
  25511. ***************
  25512. *** 69,74 ****
  25513. --- 72,80 ----
  25514.              *msgs[MAXARGS];
  25515.       struct smsg *smsgs;
  25516.   
  25517. + #ifdef LOCALE
  25518. +     setlocale(LC_ALL, "");
  25519. + #endif
  25520.       invo_name = r1bindex (argv[0], '/');
  25521.       if ((cp = m_find (invo_name)) != NULL) {
  25522.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  25523. ***************
  25524. *** 191,196 ****
  25525. --- 197,203 ----
  25526.               msgp;
  25527.       register long   pos;
  25528.       register char   c,
  25529. +             cc,
  25530.                      *msgnam;
  25531.       char    buffer[BUFSIZ],
  25532.               f1[BUFSIZ],
  25533. ***************
  25534. *** 207,213 ****
  25535.   
  25536.       mode = fstat (fileno (in), &st) != NOTOK ? (st.st_mode & 0777)
  25537.       : m_gmprot ();
  25538. !     for (msgp = 1, pos = 0L; msgp <= MAXFOLDER;) {
  25539.       while (fgets (buffer, sizeof buffer, in) != NULL
  25540.           && buffer[0] == '\n')
  25541.           pos += (long) strlen (buffer);
  25542. --- 214,220 ----
  25543.   
  25544.       mode = fstat (fileno (in), &st) != NOTOK ? (st.st_mode & 0777)
  25545.       : m_gmprot ();
  25546. !     for (msgp = 0, pos = 0L; msgp <= MAXFOLDER;) {
  25547.       while (fgets (buffer, sizeof buffer, in) != NULL
  25548.           && buffer[0] == '\n')
  25549.           pos += (long) strlen (buffer);
  25550. ***************
  25551. *** 216,227 ****
  25552.       (void) fseek (in, pos, 0);
  25553.       smsgs[msgp].s_start = pos;
  25554.   
  25555. !     for (c = NULL;
  25556.           fgets (buffer, sizeof buffer, in) != NULL;
  25557.           c = buffer[0])
  25558.           if (strncmp (buffer, delim3, ld3) == 0
  25559. !             && peekc (in) == '\n'
  25560. !             && (msgp == 1 || c == '\n'))
  25561.           break;
  25562.           else
  25563.           pos += (long) strlen (buffer);
  25564. --- 223,234 ----
  25565.       (void) fseek (in, pos, 0);
  25566.       smsgs[msgp].s_start = pos;
  25567.   
  25568. !     for (c = 0;
  25569.           fgets (buffer, sizeof buffer, in) != NULL;
  25570.           c = buffer[0])
  25571.           if (strncmp (buffer, delim3, ld3) == 0
  25572. !             && (msgp == 1 || c == '\n')
  25573. !             && ((cc = peekc (in)) == '\n' || cc == EOF))
  25574.           break;
  25575.           else
  25576.           pos += (long) strlen (buffer);
  25577. ***************
  25578. *** 228,239 ****
  25579.   
  25580.       wasdlm = strncmp (buffer, delim3, ld3) == 0;
  25581.       if (smsgs[msgp].s_start != pos)
  25582. !         smsgs[msgp++].s_stop = c == '\n' && wasdlm ? pos - 1 : pos;
  25583.       if (feof (in)) {
  25584.           if (wasdlm) {
  25585.           smsgs[msgp - 1].s_stop -= ((long) strlen (buffer) + 1);
  25586.           msgp++;        /* fake "End of XXX Digest" */
  25587.           }
  25588.           break;
  25589.       }
  25590.       pos += (long) strlen (buffer);
  25591. --- 235,248 ----
  25592.   
  25593.       wasdlm = strncmp (buffer, delim3, ld3) == 0;
  25594.       if (smsgs[msgp].s_start != pos)
  25595. !         smsgs[msgp++].s_stop = (c == '\n' && wasdlm) ? pos - 1 : pos;
  25596.       if (feof (in)) {
  25597. + #ifdef    notdef
  25598.           if (wasdlm) {
  25599.           smsgs[msgp - 1].s_stop -= ((long) strlen (buffer) + 1);
  25600.           msgp++;        /* fake "End of XXX Digest" */
  25601.           }
  25602. + #endif
  25603.           break;
  25604.       }
  25605.       pos += (long) strlen (buffer);
  25606. ***************
  25607. *** 241,247 ****
  25608.   
  25609.   /*   */
  25610.   
  25611. !     switch (--msgp) {        /* toss "End of XXX Digest" */
  25612.       case 0: 
  25613.           adios (NULLCP, "burst() botch -- you lose big");
  25614.   
  25615. --- 250,256 ----
  25616.   
  25617.   /*   */
  25618.   
  25619. !     switch (msgp--) {        /* toss "End of XXX Digest" */
  25620.       case 0: 
  25621.           adios (NULLCP, "burst() botch -- you lose big");
  25622.   
  25623. ***************
  25624. *** 254,264 ****
  25625.       default: 
  25626.           if (verbosw)
  25627.           printf ("%d message%s exploded from digest %d\n",
  25628. !             msgp - 1, msgp - 1 != 1 ? "s" : "", msgnum);
  25629. !         if (msgp == 2)    /* XXX */
  25630. !         msgp++;
  25631.           break;
  25632.       }
  25633.   
  25634.       if ((mp = m_remsg (mp, 0, mp -> hghmsg + msgp)) == NULL)
  25635.       adios (NULLCP, "unable to allocate folder storage");
  25636. --- 263,272 ----
  25637.       default: 
  25638.           if (verbosw)
  25639.           printf ("%d message%s exploded from digest %d\n",
  25640. !             msgp, msgp != 1 ? "s" : "", msgnum);
  25641.           break;
  25642.       }
  25643. +     /* msgp now contains the number of new msgs to be created */
  25644.   
  25645.       if ((mp = m_remsg (mp, 0, mp -> hghmsg + msgp)) == NULL)
  25646.       adios (NULLCP, "unable to allocate folder storage");
  25647. ***************
  25648. *** 265,278 ****
  25649.   
  25650.   /*   */
  25651.   
  25652. !     msgp--;
  25653. !     j = mp -> hghmsg;
  25654. !     mp -> hghmsg += msgp - 1;
  25655. !     mp -> nummsg += msgp - 1;
  25656.       if (mp -> hghsel > msgnum)
  25657. !     mp -> hghsel += msgp - 1;
  25658.   
  25659. !     if (inplace && msgp > 1)
  25660.       for (i = mp -> hghmsg; j > msgnum; i--, j--) {
  25661.           (void) strcpy (f1, m_name (i));
  25662.           (void) strcpy (f2, m_name (j));
  25663. --- 273,285 ----
  25664.   
  25665.   /*   */
  25666.   
  25667. !     j = mp -> hghmsg;        /* old value */
  25668. !     mp -> hghmsg += msgp;
  25669. !     mp -> nummsg += msgp;
  25670.       if (mp -> hghsel > msgnum)
  25671. !     mp -> hghsel += msgp;
  25672.   
  25673. !     if (inplace)
  25674.       for (i = mp -> hghmsg; j > msgnum; i--, j--) {
  25675.           (void) strcpy (f1, m_name (i));
  25676.           (void) strcpy (f2, m_name (j));
  25677. ***************
  25678. *** 283,296 ****
  25679.           if (rename (f2, f1) == NOTOK)
  25680.               admonish (f1, "unable to rename %s to", f2);
  25681.           mp -> msgstats[i] = mp -> msgstats[j];
  25682. !         mp -> msgstats[j] = NULL;
  25683.           mp -> msgflags |= SEQMOD;
  25684.           }
  25685.       }
  25686.       
  25687.       mp -> msgstats[msgnum] &= ~SELECTED;
  25688. !     i = inplace ? msgnum + msgp - 1 : mp -> hghmsg;
  25689. !     for (j = msgp; j >= (inplace ? 1 : 2); i--, j--) {
  25690.       (void) strcpy (f1, m_name (i));
  25691.       (void) strcpy (f2, m_scratch ("", invo_name));
  25692.       if (verbosw && i != msgnum)
  25693. --- 290,303 ----
  25694.           if (rename (f2, f1) == NOTOK)
  25695.               admonish (f1, "unable to rename %s to", f2);
  25696.           mp -> msgstats[i] = mp -> msgstats[j];
  25697. !         mp -> msgstats[j] = 0;
  25698.           mp -> msgflags |= SEQMOD;
  25699.           }
  25700.       }
  25701.       
  25702.       mp -> msgstats[msgnum] &= ~SELECTED;
  25703. !     i = inplace ? msgnum + msgp : mp -> hghmsg; /* new hghmsg is hghmsg+msgp */
  25704. !     for (j = msgp; j >= (inplace ? 0 : 1); i--, j--) {
  25705.       (void) strcpy (f1, m_name (i));
  25706.       (void) strcpy (f2, m_scratch ("", invo_name));
  25707.       if (verbosw && i != msgnum)
  25708. ***************
  25709. *** 337,343 ****
  25710.                       state;
  25711.   
  25712.       for (state = S1; (c = fgetc (in)) != EOF && len > 0; len--) {
  25713. !     if (c == NULL)
  25714.           continue;
  25715.       switch (state) {
  25716.           case S1: 
  25717. --- 344,350 ----
  25718.                       state;
  25719.   
  25720.       for (state = S1; (c = fgetc (in)) != EOF && len > 0; len--) {
  25721. !     if (c == 0)
  25722.           continue;
  25723.       switch (state) {
  25724.           case S1: 
  25725. *** ../mh-6.7.2/uip/comp.c    Thu Apr  5 16:03:53 1990
  25726. --- uip/comp.c    Mon Dec 14 16:21:02 1992
  25727. ***************
  25728. *** 1,12 ****
  25729.   /* comp.c - compose a message */
  25730.   #ifndef    lint
  25731. ! static char ident[] = "@(#)$Id: comp.c,v 1.3 90/04/05 15:03:07 sources Exp $";
  25732. ! #endif    lint
  25733.   
  25734.   #include "../h/mh.h"
  25735.   #include <stdio.h>
  25736.   #include <sys/types.h>
  25737.   #include <sys/stat.h>
  25738.   
  25739.   /*   */
  25740.   
  25741. --- 1,15 ----
  25742.   /* comp.c - compose a message */
  25743.   #ifndef    lint
  25744. ! static char ident[] = "@(#)$Id: comp.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  25745. ! #endif    /* lint */
  25746.   
  25747.   #include "../h/mh.h"
  25748.   #include <stdio.h>
  25749.   #include <sys/types.h>
  25750.   #include <sys/stat.h>
  25751. + #ifdef LOCALE
  25752. + #include    <locale.h>
  25753. + #endif
  25754.   
  25755.   /*   */
  25756.   
  25757. ***************
  25758. *** 42,48 ****
  25759.       "help", 4,
  25760.   
  25761.   
  25762. !     NULL, NULL
  25763.   };
  25764.   
  25765.   /*   */
  25766. --- 45,51 ----
  25767.       "help", 4,
  25768.   
  25769.   
  25770. !     NULL, 0
  25771.   };
  25772.   
  25773.   /*   */
  25774. ***************
  25775. *** 61,67 ****
  25776.   #define NEWSW    5
  25777.       "new", 0,
  25778.   
  25779. !     NULL, NULL
  25780.   };
  25781.   
  25782.   
  25783. --- 64,70 ----
  25784.   #define NEWSW    5
  25785.       "new", 0,
  25786.   
  25787. !     NULL, 0
  25788.   };
  25789.   
  25790.   
  25791. ***************
  25792. *** 72,78 ****
  25793.       "list", 0,
  25794.       "refile", 0,
  25795.   
  25796. !     NULL, NULL
  25797.   };
  25798.   
  25799.   /*   */
  25800. --- 75,81 ----
  25801.       "list", 0,
  25802.       "refile", 0,
  25803.   
  25804. !     NULL, 0
  25805.   };
  25806.   
  25807.   /*   */
  25808. ***************
  25809. *** 107,112 ****
  25810. --- 110,118 ----
  25811.       struct msgs *mp = NULL;
  25812.       struct stat st;
  25813.   
  25814. + #ifdef LOCALE
  25815. +     setlocale(LC_ALL, "");
  25816. + #endif
  25817.       invo_name = r1bindex (argv[0], '/');
  25818.       if ((cp = m_find (invo_name)) != NULL) {
  25819.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  25820. ***************
  25821. *** 306,311 ****
  25822.   
  25823.       if (nwhat)
  25824.       done (0);
  25825. !     (void) m_whatnow (ed, nedit, use, drft, NULLCP, 0, NULLMP, NULLCP, 0, cwd);
  25826.       done (1);
  25827.   }
  25828. --- 312,317 ----
  25829.   
  25830.       if (nwhat)
  25831.       done (0);
  25832. !     (void) what_now (ed, nedit, use, drft, NULLCP, 0, NULLMP, NULLCP, 0, cwd);
  25833.       done (1);
  25834.   }
  25835. *** ../mh-6.7.2/uip/conflict.c    Thu Apr  5 16:03:26 1990
  25836. --- uip/conflict.c    Mon Dec 14 16:07:55 1992
  25837. ***************
  25838. *** 1,7 ****
  25839.   /* conflict.c - the new conflict */
  25840.   #ifndef    lint
  25841. ! static char ident[] = "@(#)$Id: conflict.c,v 2.2 90/04/05 14:57:02 sources Exp $";
  25842. ! #endif    lint
  25843.   
  25844.   #include "../h/mh.h"
  25845.   #include "../h/aliasbr.h"
  25846. --- 1,7 ----
  25847.   /* conflict.c - the new conflict */
  25848.   #ifndef    lint
  25849. ! static char ident[] = "@(#)$Id: conflict.c,v 2.9 1992/12/15 00:07:52 jromine Exp $";
  25850. ! #endif    /* lint */
  25851.   
  25852.   #include "../h/mh.h"
  25853.   #include "../h/aliasbr.h"
  25854. ***************
  25855. *** 10,17 ****
  25856.   #include "../zotnet/mts.h"
  25857.   #include <grp.h>
  25858.   #include <pwd.h>
  25859.   
  25860.   #define    NDIRS    100
  25861.   #define    NGRPS    100
  25862.   
  25863. --- 10,19 ----
  25864.   #include "../zotnet/mts.h"
  25865.   #include <grp.h>
  25866.   #include <pwd.h>
  25867. + #ifdef LOCALE
  25868. + #include    <locale.h>
  25869. + #endif
  25870.   
  25871.   #define    NDIRS    100
  25872.   #define    NGRPS    100
  25873.   
  25874. ***************
  25875. *** 27,33 ****
  25876.   #define    HELPSW    2
  25877.       "help", 4,
  25878.   
  25879. !     NULL, NULL
  25880.   };
  25881.   
  25882.   /*   */
  25883. --- 29,35 ----
  25884.   #define    HELPSW    2
  25885.       "help", 4,
  25886.   
  25887. !     NULL, 0
  25888.   };
  25889.   
  25890.   /*   */
  25891. ***************
  25892. *** 43,49 ****
  25893.   extern struct home *homehead;
  25894.   
  25895.   
  25896. ! struct    group *getgrent (),*getgrgid();
  25897.   
  25898.   /*   */
  25899.   
  25900. --- 45,53 ----
  25901.   extern struct home *homehead;
  25902.   
  25903.   
  25904. ! #if !defined(__STDC__) && !defined(__stdc__)    /* __stdc__ for convex */
  25905. ! struct    group *getgrent (), *getgrgid();
  25906. ! #endif /* !__STDC__ */
  25907.   
  25908.   /*   */
  25909.   
  25910. ***************
  25911. *** 60,65 ****
  25912. --- 64,72 ----
  25913.               buf[80],
  25914.              *akv[50];
  25915.   
  25916. + #ifdef LOCALE
  25917. +     setlocale(LC_ALL, "");
  25918. + #endif
  25919.       invo_name = r1bindex (argv[0], '/');
  25920.       m_foil (NULLCP);
  25921.       mts_init (invo_name);
  25922. ***************
  25923. *** 118,124 ****
  25924.   #ifdef    UCI
  25925.       ldr_names ();
  25926.       ldr_ship ();
  25927. ! #endif    UCI
  25928.       maildrops ();
  25929.   
  25930.       done (0);
  25931. --- 125,131 ----
  25932.   #ifdef    UCI
  25933.       ldr_names ();
  25934.       ldr_ship ();
  25935. ! #endif    /* UCI */
  25936.       maildrops ();
  25937.   
  25938.       done (0);
  25939. ***************
  25940. *** 225,231 ****
  25941.   #ifdef    BSD42
  25942.           else
  25943.           hm -> h_ngrps++;
  25944. ! #endif    BSD42
  25945.   
  25946.           for (dp = cp + 1; *dp; dp++)
  25947.           if (strcmp (*cp, *dp) == 0) {
  25948. --- 232,238 ----
  25949.   #ifdef    BSD42
  25950.           else
  25951.           hm -> h_ngrps++;
  25952. ! #endif    /* BSD42 */
  25953.   
  25954.           for (dp = cp + 1; *dp; dp++)
  25955.           if (strcmp (*cp, *dp) == 0) {
  25956. ***************
  25957. *** 245,251 ****
  25958.               hm -> h_name, hm -> h_ngrps, NGROUPS);
  25959.           hit++;
  25960.       }
  25961. ! #endif    BSD42
  25962.   
  25963.       if (!hit && out && !mail)
  25964.       fprintf (out, "all group members accounted for\n");
  25965. --- 252,258 ----
  25966.               hm -> h_name, hm -> h_ngrps, NGROUPS);
  25967.           hit++;
  25968.       }
  25969. ! #endif    /* BSD42 */
  25970.   
  25971.       if (!hit && out && !mail)
  25972.       fprintf (out, "all group members accounted for\n");
  25973. ***************
  25974. *** 289,297 ****
  25975.       register int    hit = 0;
  25976.   #ifdef SYS5DIR
  25977.       register struct dirent *dp;
  25978. ! #else  SYS5DIR
  25979.       register struct direct *dp;
  25980. ! #endif SYS5DIR
  25981.       register DIR *dd = opendir (drop);
  25982.   
  25983.       if (!dd) {
  25984. --- 296,304 ----
  25985.       register int    hit = 0;
  25986.   #ifdef SYS5DIR
  25987.       register struct dirent *dp;
  25988. ! #else    /*  SYS5DIR */
  25989.       register struct direct *dp;
  25990. ! #endif    /* SYS5DIR */
  25991.       register DIR *dd = opendir (drop);
  25992.   
  25993.       if (!dd) {
  25994. ***************
  25995. *** 438,445 ****
  25996.       while (*cp && !isspace (*cp))
  25997.           cp++;
  25998.       while (*cp && isspace (*cp))
  25999. !         *cp++ = NULL;
  26000. !     if (*cp == NULL)
  26001.           break;
  26002.       if (q < gl_ldr + MAXGLS)
  26003.           *q++ = cp;
  26004. --- 445,452 ----
  26005.       while (*cp && !isspace (*cp))
  26006.           cp++;
  26007.       while (*cp && isspace (*cp))
  26008. !         *cp++ = '\0';
  26009. !     if (*cp == '\0')
  26010.           break;
  26011.       if (q < gl_ldr + MAXGLS)
  26012.           *q++ = cp;
  26013. ***************
  26014. *** 543,546 ****
  26015.       if (!hit && out && !mail)
  26016.       fprintf (out, "all group leaders accounted for\n");
  26017.   }
  26018. ! #endif    UCI
  26019. --- 550,553 ----
  26020.       if (!hit && out && !mail)
  26021.       fprintf (out, "all group leaders accounted for\n");
  26022.   }
  26023. ! #endif    /* UCI */
  26024. *** ../mh-6.7.2/uip/dist.c    Thu Oct 29 15:02:18 1987
  26025. --- uip/dist.c    Mon Dec 14 16:21:03 1992
  26026. ***************
  26027. *** 1,9 ****
  26028. --- 1,15 ----
  26029.   /* dist.c - re-distribute a message */
  26030. + #ifndef    lint
  26031. + static char ident[] = "@(#)$Id: dist.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
  26032. + #endif    /* lint */
  26033.   
  26034.   #include "../h/mh.h"
  26035.   #include <stdio.h>
  26036.   #include <sys/types.h>
  26037.   #include <sys/stat.h>
  26038. + #ifdef LOCALE
  26039. + #include    <locale.h>
  26040. + #endif
  26041.   
  26042.   /*   */
  26043.   
  26044. ***************
  26045. *** 44,50 ****
  26046.   #define    FILESW    13
  26047.       "file file", -4,        /* interface from msh */
  26048.   
  26049. !     NULL, NULL
  26050.   };
  26051.   
  26052.   /*   */
  26053. --- 50,56 ----
  26054.   #define    FILESW    13
  26055.       "file file", -4,        /* interface from msh */
  26056.   
  26057. !     NULL, 0
  26058.   };
  26059.   
  26060.   /*   */
  26061. ***************
  26062. *** 61,67 ****
  26063.   #define NEWSW    4
  26064.       "new", 0,
  26065.   
  26066. !     NULL, NULL
  26067.   };
  26068.   
  26069.   
  26070. --- 67,73 ----
  26071.   #define NEWSW    4
  26072.       "new", 0,
  26073.   
  26074. !     NULL, 0
  26075.   };
  26076.   
  26077.   
  26078. ***************
  26079. *** 71,77 ****
  26080.       "list", 0,
  26081.       "refile +folder", 0,
  26082.   
  26083. !     NULL, NULL
  26084.   };
  26085.   
  26086.   /*   */
  26087. --- 77,83 ----
  26088.       "list", 0,
  26089.       "refile +folder", 0,
  26090.   
  26091. !     NULL, 0
  26092.   };
  26093.   
  26094.   /*   */
  26095. ***************
  26096. *** 109,114 ****
  26097. --- 115,123 ----
  26098.       struct msgs *mp = NULL;
  26099.       struct stat st;
  26100.   
  26101. + #ifdef LOCALE
  26102. +     setlocale(LC_ALL, "");
  26103. + #endif
  26104.       invo_name = r1bindex (argv[0], '/');
  26105.       if ((cp = m_find (invo_name)) != NULL) {
  26106.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  26107. ***************
  26108. *** 307,313 ****
  26109.   
  26110.       if (nwhat)
  26111.       done (0);
  26112. !     (void) m_whatnow (ed, nedit, NOUSE, drft, msgnam, 1, mp,
  26113.       anot ? "Resent" : NULLCP, inplace, cwd);
  26114.       done (1);
  26115.   }
  26116. --- 316,322 ----
  26117.   
  26118.       if (nwhat)
  26119.       done (0);
  26120. !     (void) what_now (ed, nedit, NOUSE, drft, msgnam, 1, mp,
  26121.       anot ? "Resent" : NULLCP, inplace, cwd);
  26122.       done (1);
  26123.   }
  26124. *** ../mh-6.7.2/uip/distsbr.c    Thu Apr  5 16:03:41 1990
  26125. --- uip/distsbr.c    Mon Dec 14 16:21:04 1992
  26126. ***************
  26127. *** 1,7 ****
  26128.   /* distsbr.c - routines to do additional "dist-style" processing */
  26129.   #ifndef    lint
  26130. ! static char ident[] = "@(#)$Id: distsbr.c,v 1.3 90/04/05 15:00:50 sources Exp $";
  26131. ! #endif    lint
  26132.   
  26133.   #include "../h/mh.h"
  26134.   #include <ctype.h>
  26135. --- 1,7 ----
  26136.   /* distsbr.c - routines to do additional "dist-style" processing */
  26137.   #ifndef    lint
  26138. ! static char ident[] = "@(#)$Id: distsbr.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  26139. ! #endif    /* lint */
  26140.   
  26141.   #include "../h/mh.h"
  26142.   #include <ctype.h>
  26143. *** ../mh-6.7.2/uip/dp.c    Thu Apr  5 16:03:41 1990
  26144. --- uip/dp.c    Mon Dec 14 16:21:05 1992
  26145. ***************
  26146. *** 1,12 ****
  26147.   /* dp.c  - parse dates 822-style */
  26148.   #ifndef    lint
  26149. ! static char ident[] = "@(#)$Id: dp.c,v 1.3 90/04/05 15:01:00 sources Exp $";
  26150. ! #endif    lint
  26151.   
  26152.   #include "../h/mh.h"
  26153.   #include "../h/formatsbr.h"
  26154.   #include "../zotnet/tws.h"
  26155.   #include <stdio.h>
  26156.   
  26157.   
  26158.   #define    NDATES    100
  26159. --- 1,15 ----
  26160.   /* dp.c  - parse dates 822-style */
  26161.   #ifndef    lint
  26162. ! static char ident[] = "@(#)$Id: dp.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  26163. ! #endif    /* lint */
  26164.   
  26165.   #include "../h/mh.h"
  26166.   #include "../h/formatsbr.h"
  26167.   #include "../zotnet/tws.h"
  26168.   #include <stdio.h>
  26169. + #ifdef LOCALE
  26170. + #include    <locale.h>
  26171. + #endif
  26172.   
  26173.   
  26174.   #define    NDATES    100
  26175. ***************
  26176. *** 30,36 ****
  26177.   #define    HELPSW    3
  26178.       "help", 4,
  26179.   
  26180. !     NULL, NULL
  26181.   };
  26182.   
  26183.   /*   */
  26184. --- 33,39 ----
  26185.   #define    HELPSW    3
  26186.       "help", 4,
  26187.   
  26188. !     NULL, 0
  26189.   };
  26190.   
  26191.   /*   */
  26192. ***************
  26193. *** 37,43 ****
  26194.   
  26195.   static struct format *fmt;
  26196.   
  26197. ! static int dat[4];
  26198.   
  26199.   static int    process();
  26200.   /*   */
  26201. --- 40,46 ----
  26202.   
  26203.   static struct format *fmt;
  26204.   
  26205. ! static int dat[5];
  26206.   
  26207.   static int    process();
  26208.   /*   */
  26209. ***************
  26210. *** 61,66 ****
  26211. --- 64,72 ----
  26212.              *arguments[MAXARGS],
  26213.              *dates[NDATES];
  26214.   
  26215. + #ifdef LOCALE
  26216. +     setlocale(LC_ALL, "");
  26217. + #endif
  26218.       invo_name = r1bindex (argv[0], '/');
  26219.       if ((cp = m_find (invo_name)) != NULL) {
  26220.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  26221. ***************
  26222. *** 124,130 ****
  26223.       if (width > WBUFSIZ)
  26224.       width = WBUFSIZ;
  26225.       (void) fmt_compile (nfs, &fmt);
  26226. !     dat[0] = dat[1] = dat[2] = 0;
  26227.       dat[3] = width;
  26228.   
  26229.       for (datep = 0; dates[datep]; datep++)
  26230. --- 130,136 ----
  26231.       if (width > WBUFSIZ)
  26232.       width = WBUFSIZ;
  26233.       (void) fmt_compile (nfs, &fmt);
  26234. !     dat[0] = dat[1] = dat[2] = dat[4] = 0;
  26235.       dat[3] = width;
  26236.   
  26237.       for (datep = 0; dates[datep]; datep++)
  26238. *** ../mh-6.7.2/uip/dropsbr.c    Fri Jan 25 15:02:47 1991
  26239. --- uip/dropsbr.c    Mon Dec 14 16:21:06 1992
  26240. ***************
  26241. *** 1,7 ****
  26242.   /* dropsbr.c - write to a mailbox */
  26243.   #ifndef    lint
  26244. ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.12 90/11/05 13:26:50 mh Exp $";
  26245. ! #endif    lint
  26246.   
  26247.   #include <stdio.h>
  26248.   #ifndef    MMDFONLY
  26249. --- 1,7 ----
  26250.   /* dropsbr.c - write to a mailbox */
  26251.   #ifndef    lint
  26252. ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.15 1992/12/15 00:20:22 jromine Exp $";
  26253. ! #endif    /* lint */
  26254.   
  26255.   #include <stdio.h>
  26256.   #ifndef    MMDFONLY
  26257. ***************
  26258. *** 8,18 ****
  26259.   #include "../h/mh.h"
  26260.   #include "../h/dropsbr.h"
  26261.   #include "../zotnet/mts.h"
  26262. ! #else    MMDFONLY
  26263.   #include "dropsbr.h"
  26264.   #include "strings.h"
  26265.   #include "mmdfonly.h"
  26266. ! #endif    MMDFONLY
  26267.   #include <errno.h>
  26268.   #include <sys/types.h>
  26269.   #include <sys/stat.h>
  26270. --- 8,18 ----
  26271.   #include "../h/mh.h"
  26272.   #include "../h/dropsbr.h"
  26273.   #include "../zotnet/mts.h"
  26274. ! #else    /* MMDFONLY */
  26275.   #include "dropsbr.h"
  26276.   #include "strings.h"
  26277.   #include "mmdfonly.h"
  26278. ! #endif    /* MMDFONLY */
  26279.   #include <errno.h>
  26280.   #include <sys/types.h>
  26281.   #include <sys/stat.h>
  26282. ***************
  26283. *** 113,119 ****
  26284.   
  26285.   #ifdef    BSD42
  26286.           case EWOULDBLOCK:
  26287. ! #endif    BSD42
  26288.           case ETXTBSY: 
  26289.               j = errno;
  26290.               sleep (5);
  26291. --- 113,119 ----
  26292.   
  26293.   #ifdef    BSD42
  26294.           case EWOULDBLOCK:
  26295. ! #endif    /* BSD42 */
  26296.           case ETXTBSY: 
  26297.               j = errno;
  26298.               sleep (5);
  26299. ***************
  26300. *** 163,169 ****
  26301.       if (lseek (fd, (long) (-count), 2) == (long) NOTOK
  26302.           || read (fd, ldelim, count) != count)
  26303.       return NOTOK;
  26304. !     ldelim[count] = NULL;
  26305.   
  26306.       if (strcmp (ldelim, mmdlm2)
  26307.           && write (fd, "\n", 1) != 1
  26308. --- 163,169 ----
  26309.       if (lseek (fd, (long) (-count), 2) == (long) NOTOK
  26310.           || read (fd, ldelim, count) != count)
  26311.       return NOTOK;
  26312. !     ldelim[count] = 0;
  26313.   
  26314.       if (strcmp (ldelim, mmdlm2)
  26315.           && write (fd, "\n", 1) != 1
  26316. ***************
  26317. *** 395,401 ****
  26318.               
  26319.           for (j = 0; fgets (buffer, sizeof buffer, fp) != NULL; j++) {
  26320.           if (j != 0 && strncmp (buffer, "From ", 5) == 0) {
  26321. !             (void) write (fd, ">", 1);
  26322.               size++;
  26323.           }
  26324.           i = strlen (buffer);
  26325. --- 395,401 ----
  26326.               
  26327.           for (j = 0; fgets (buffer, sizeof buffer, fp) != NULL; j++) {
  26328.           if (j != 0 && strncmp (buffer, "From ", 5) == 0) {
  26329. !             (void) write (md, ">", 1);
  26330.               size++;
  26331.           }
  26332.           i = strlen (buffer);
  26333. ***************
  26334. *** 682,688 ****
  26335.       if (read (fd, (char *) &tmpd, sizeof *dp) != sizeof *dp) {
  26336.   #ifdef    notdef
  26337.       admonish (NULLCP, "%s: missing or partial index", file);
  26338. ! #endif    notdef
  26339.       return NOTOK;
  26340.       }
  26341.   #ifndef    NTOHLSWAP
  26342. --- 682,688 ----
  26343.       if (read (fd, (char *) &tmpd, sizeof *dp) != sizeof *dp) {
  26344.   #ifdef    notdef
  26345.       admonish (NULLCP, "%s: missing or partial index", file);
  26346. ! #endif    /* notdef */
  26347.       return NOTOK;
  26348.       }
  26349.   #ifndef    NTOHLSWAP
  26350. *** ../mh-6.7.2/uip/fmtdump.c    Thu Jan 23 16:04:50 1992
  26351. --- uip/fmtdump.c    Tue Nov  3 16:42:33 1992
  26352. ***************
  26353. *** 1,52 ****
  26354.   #ifndef lint
  26355. ! static char ident[] = "@(#)$Id: fmtdump.c,v 1.7 1992/01/24 00:04:45 jromine Exp $";
  26356.   #endif
  26357. - /*
  26358. -  * fmtdump - compile format file and dump out instructions
  26359. -  *
  26360. -  * usage:
  26361. -  *
  26362. -  *    fmtdump [formatfile]
  26363. -  *
  26364. -  */
  26365.   
  26366.   #include "../h/mh.h"
  26367.   #include "../h/formatsbr.h"
  26368.   #include "../h/fmtcompile.h"
  26369.   #include <stdio.h>
  26370.   
  26371. - static struct format *lvec[128];
  26372. - static lused = 0;
  26373.   
  26374. ! char *f_typestr(), *c_typestr();
  26375. ! static int findlabel();
  26376.   
  26377. ! void
  26378. ! main(argc, argv)
  26379. !     int argc;
  26380. !     char **argv;
  26381.   {
  26382. !     int n;
  26383. !     struct format *fmt;
  26384. !     char *file = "scan.format";
  26385. !     char *str;
  26386.   
  26387. !     if (argc > 1)
  26388. !         file = argv[1];
  26389.   
  26390. !     /* Read format file into memory */
  26391. !     str = new_fs(file, 0, 0);
  26392.   
  26393. !     /* Compile format */
  26394. !     n = fmt_compile(str, &fmt);
  26395.   
  26396. !     /* Dump format */
  26397. !     dumpall(fmt);
  26398. !     exit(0);
  26399.   }
  26400.   
  26401. ! dumpall(fmth)
  26402. !     register struct format *fmth;
  26403.   {
  26404.       int i;
  26405.       register struct format *fmt, *addr;
  26406. --- 1,115 ----
  26407. + /* fmtdump.c - compile format file and dump out instructions */
  26408.   #ifndef lint
  26409. ! static char ident[] = "@(#)$Id: fmtdump.c,v 1.10 1992/11/04 00:42:31 jromine Exp $";
  26410.   #endif
  26411.   
  26412.   #include "../h/mh.h"
  26413.   #include "../h/formatsbr.h"
  26414.   #include "../h/fmtcompile.h"
  26415. + #include "../h/scansbr.h"
  26416.   #include <stdio.h>
  26417. + #ifdef LOCALE
  26418. + #include    <locale.h>
  26419. + #endif
  26420.   
  26421.   
  26422. ! static struct swit switches[] = {
  26423. ! #define    FORMSW    0
  26424. !     "form formatfile", 0,
  26425. ! #define    FMTSW    1
  26426. !     "format string", 5,
  26427.   
  26428. ! #define    HELPSW    2
  26429. !     "help", 4,
  26430. !     NULL, 0
  26431. ! };
  26432. ! /* for assignlabel */
  26433. ! static     struct format *lvec[128];
  26434. ! static     lused = 0;
  26435. ! static    char *f_typestr(), *c_typestr();
  26436. ! static    void  fmt_dump(), dumpone(), assignlabel(), litputs(), litputc();
  26437. ! static     int   findlabel();
  26438. ! /*   */
  26439. ! /* ARGSUSED */
  26440. ! main (argc, argv)
  26441. ! int     argc;
  26442. ! char   *argv[];
  26443.   {
  26444. !     int    ncomps;
  26445. !     char   *cp,
  26446. !        *form = NULL,
  26447. !        *format = NULL,
  26448. !             buf[100],
  26449. !           **ap,
  26450. !           **argp,
  26451. !            *nfs,
  26452. !            *arguments[MAXARGS];
  26453. !     struct format *fmt;
  26454.   
  26455. ! #ifdef LOCALE
  26456. !     setlocale(LC_ALL, "");
  26457. ! #endif
  26458. !     invo_name = r1bindex (argv[0], '/');
  26459. !     if ((cp = m_find (invo_name)) != NULL) {
  26460. !     ap = brkstring (cp = getcpy (cp), " ", "\n");
  26461. !     ap = copyip (ap, arguments);
  26462. !     }
  26463. !     else
  26464. !     ap = arguments;
  26465. !     (void) copyip (argv + 1, ap);
  26466. !     argp = arguments;
  26467.   
  26468. ! /*   */
  26469.   
  26470. !     while (cp = *argp++) {
  26471. !     if (*cp == '-')
  26472. !         switch (smatch (++cp, switches)) {
  26473. !         case AMBIGSW: 
  26474. !             ambigsw (cp, switches);
  26475. !             done (1);
  26476. !         case UNKWNSW: 
  26477. !             adios (NULLCP, "-%s unknown", cp);
  26478. !         case HELPSW: 
  26479. !             (void) sprintf (buf, "%s [switches]",
  26480. !                 invo_name);
  26481. !             help (buf, switches);
  26482. !             done (1);
  26483.   
  26484. !         case FORMSW: 
  26485. !             if (!(form = *argp++) || *form == '-')
  26486. !             adios (NULLCP, "missing argument to %s", argp[-2]);
  26487. !             format = NULL;
  26488. !             continue;
  26489. !         case FMTSW: 
  26490. !             if (!(format = *argp++) || *format == '-')
  26491. !             adios (NULLCP, "missing argument to %s", argp[-2]);
  26492. !             form = NULL;
  26493. !             continue;
  26494. !         }
  26495. !     if (form)
  26496. !         adios (NULLCP, "only one form at a time!");
  26497. !     else
  26498. !         form = cp;
  26499. !     }
  26500. !     nfs = new_fs (form, format, FORMAT);    /* must be before chdir() */
  26501. !     ncomps = fmt_compile(nfs, &fmt);
  26502. !     fmt_dump(fmt);
  26503. !     done(0);
  26504.   }
  26505.   
  26506. ! static void
  26507. ! fmt_dump (fmth)
  26508. ! register struct format *fmth;
  26509.   {
  26510.       int i;
  26511.       register struct format *fmt, *addr;
  26512. ***************
  26513. *** 78,83 ****
  26514. --- 141,147 ----
  26515.       }
  26516.   }
  26517.   
  26518. + static void
  26519.   dumpone(fmt)
  26520.       register struct format *fmt;
  26521.   {
  26522. ***************
  26523. *** 202,208 ****
  26524.       case FT_IF_S_NULL:
  26525.       case FT_IF_MATCH:
  26526.       case FT_IF_AMATCH:
  26527. !         printf(" false, goto");
  26528.       case FT_GOTO:
  26529.           i = findlabel(fmt + fmt->f_skip);
  26530.           printf(" L%d", i);
  26531. --- 266,272 ----
  26532.       case FT_IF_S_NULL:
  26533.       case FT_IF_MATCH:
  26534.       case FT_IF_AMATCH:
  26535. !         printf(" continue else goto");
  26536.       case FT_GOTO:
  26537.           i = findlabel(fmt + fmt->f_skip);
  26538.           printf(" L%d", i);
  26539. ***************
  26540. *** 212,218 ****
  26541.       case FT_IF_V_NE:
  26542.       case FT_IF_V_GT:
  26543.           i = findlabel(fmt + fmt->f_skip);
  26544. !         printf(" %d goto L%d", fmt->f_value, i);
  26545.           break;
  26546.   
  26547.       case FT_V_EQ:
  26548. --- 276,282 ----
  26549.       case FT_IF_V_NE:
  26550.       case FT_IF_V_GT:
  26551.           i = findlabel(fmt + fmt->f_skip);
  26552. !         printf(" %d continue else goto L%d", fmt->f_value, i);
  26553.           break;
  26554.   
  26555.       case FT_V_EQ:
  26556. ***************
  26557. *** 222,227 ****
  26558. --- 286,292 ----
  26559.       case FT_LV_PLUS_L:
  26560.       case FT_LV_MINUS_L:
  26561.       case FT_LV_DIVIDE_L:
  26562. +     case FT_LV_MODULO_L:
  26563.           printf(" value %d", fmt->f_value);
  26564.           break;
  26565.   
  26566. ***************
  26567. *** 258,263 ****
  26568. --- 323,329 ----
  26569.       return(-1);
  26570.   }
  26571.   
  26572. + static void
  26573.   assignlabel(addr)
  26574.       register struct format *addr;
  26575.   {
  26576. ***************
  26577. *** 264,270 ****
  26578.       lvec[lused++] = addr;
  26579.   }
  26580.   
  26581. ! char *
  26582.   f_typestr(t)
  26583.       int t;
  26584.   {
  26585. --- 330,336 ----
  26586.       lvec[lused++] = addr;
  26587.   }
  26588.   
  26589. ! static char *
  26590.   f_typestr(t)
  26591.       int t;
  26592.   {
  26593. ***************
  26594. *** 297,302 ****
  26595. --- 363,369 ----
  26596.       case FT_LV_PLUS_L: return("LV_PLUS_L");
  26597.       case FT_LV_MINUS_L: return("LV_MINUS_L");
  26598.       case FT_LV_DIVIDE_L: return("LV_DIVIDE_L");
  26599. +     case FT_LV_MODULO_L: return("LV_MODULO_L");
  26600.       case FT_LV_CHAR_LEFT: return("LV_CHAR_LEFT");
  26601.       case FT_LS_MONTH: return("LS_MONTH");
  26602.       case FT_LS_LMONTH: return("LS_LMONTH");
  26603. ***************
  26604. *** 372,378 ****
  26605.           strcat(buf, "|"); \
  26606.       strcat(buf, s); }
  26607.   
  26608. ! char *
  26609.   c_typestr(t)
  26610.       int t;
  26611.   {
  26612. --- 439,445 ----
  26613.           strcat(buf, "|"); \
  26614.       strcat(buf, s); }
  26615.   
  26616. ! static char *
  26617.   c_typestr(t)
  26618.       int t;
  26619.   {
  26620. ***************
  26621. *** 393,398 ****
  26622. --- 460,466 ----
  26623.   #undef FNORD
  26624.   }
  26625.   
  26626. + static void
  26627.   litputs(s)
  26628.       register char *s;
  26629.   {
  26630. ***************
  26631. *** 405,410 ****
  26632. --- 473,479 ----
  26633.           fputs("<nil>", stdout);
  26634.   }
  26635.   
  26636. + static void
  26637.   litputc(c)
  26638.       char c;
  26639.   {
  26640. *** ../mh-6.7.2/uip/folder.c    Mon Jan 14 16:49:55 1991
  26641. --- uip/folder.c    Mon Dec 14 16:21:08 1992
  26642. ***************
  26643. *** 1,12 ****
  26644.   /* folder(s).c - report on folders */
  26645.   #ifndef    lint
  26646. ! static char ident[] = "@(#)$Id: folder.c,v 2.4 90/04/05 14:56:54 sources Exp $";
  26647. ! #endif    lint
  26648.   
  26649.   #include "../h/mh.h"
  26650.   #include "../h/local.h"
  26651.   #include <errno.h>
  26652.   #include <stdio.h>
  26653.   
  26654.   static        dodir(), addir(), addfold(), dother();
  26655.   static int    pfold(), sfold(), compare();
  26656. --- 1,15 ----
  26657.   /* folder(s).c - report on folders */
  26658.   #ifndef    lint
  26659. ! static char ident[] = "@(#)$Id: folder.c,v 2.9 1992/12/15 00:20:22 jromine Exp $";
  26660. ! #endif    /* lint */
  26661.   
  26662.   #include "../h/mh.h"
  26663.   #include "../h/local.h"
  26664.   #include <errno.h>
  26665.   #include <stdio.h>
  26666. + #ifdef LOCALE
  26667. + #include    <locale.h>
  26668. + #endif
  26669.   
  26670.   static        dodir(), addir(), addfold(), dother();
  26671.   static int    pfold(), sfold(), compare();
  26672. ***************
  26673. *** 48,54 ****
  26674.   #define    PRNTSW    13
  26675.       "print", 0,
  26676.   #define    NPRNTSW    14
  26677. !     "noprint", 0,
  26678.   #define    LISTSW    15
  26679.       "list", 0,
  26680.   #define    NLISTSW    16
  26681. --- 51,57 ----
  26682.   #define    PRNTSW    13
  26683.       "print", 0,
  26684.   #define    NPRNTSW    14
  26685. !     "noprint", -4,
  26686.   #define    LISTSW    15
  26687.       "list", 0,
  26688.   #define    NLISTSW    16
  26689. ***************
  26690. *** 61,67 ****
  26691.   #define    HELPSW    19
  26692.       "help", 4,
  26693.   
  26694. !     NULL, NULL
  26695.   };
  26696.   
  26697.   /*   */
  26698. --- 64,70 ----
  26699.   #define    HELPSW    19
  26700.       "help", 4,
  26701.   
  26702. !     NULL, 0
  26703.   };
  26704.   
  26705.   /*   */
  26706. ***************
  26707. *** 108,113 ****
  26708. --- 111,119 ----
  26709.              *arguments[MAXARGS];
  26710.       struct stat st;
  26711.   
  26712. + #ifdef LOCALE
  26713. +     setlocale(LC_ALL, "");
  26714. + #endif
  26715.       invo_name = r1bindex (argv[0], '/');
  26716.       if (argv[0][strlen (argv[0]) - 1] == 's')
  26717.       all++;
  26718. ***************
  26719. *** 201,210 ****
  26720. --- 207,218 ----
  26721.   
  26722.           case PUSHSW: 
  26723.               pushsw++;
  26724. +             listsw++;
  26725.               popsw = 0;
  26726.               continue;
  26727.           case POPSW: 
  26728.               popsw++;
  26729. +             listsw++;
  26730.               pushsw = 0;
  26731.               continue;
  26732.           }
  26733. ***************
  26734. *** 267,273 ****
  26735.       m_update ();
  26736.       argfolder = NULL;
  26737.       }
  26738. !     if (pushsw || popsw || listsw) {
  26739.       printf ("%s", argfolder ? argfolder : m_getfolder ());
  26740.       if (cp = m_find (stack)) {
  26741.           for (ap = brkstring (dp = getcpy (cp), " ", "\n"); *ap; ap++)
  26742. --- 275,281 ----
  26743.       m_update ();
  26744.       argfolder = NULL;
  26745.       }
  26746. !     if (listsw) {
  26747.       printf ("%s", argfolder ? argfolder : m_getfolder ());
  26748.       if (cp = m_find (stack)) {
  26749.           for (ap = brkstring (dp = getcpy (cp), " ", "\n"); *ap; ap++)
  26750. ***************
  26751. *** 284,300 ****
  26752.   
  26753.       if (all) {
  26754.       fheader = 0;
  26755. !     if (argfolder || msg) {
  26756. !         (void) strcpy (folder, argfolder ? argfolder : m_getfolder ());
  26757. !         if (pfold (argfolder, msg) && argfolder) {
  26758.           m_replace (pfolder, argfolder);
  26759.           m_update ();
  26760.           }
  26761. !         if (!frecurse)    /* counter-intuitive */
  26762. !         dodir (folder);
  26763.       }
  26764.       else {
  26765.           dother ();
  26766.   
  26767.           (void) strcpy (folder, (cp = m_find (pfolder)) ? cp : "");
  26768. --- 292,309 ----
  26769.   
  26770.       if (all) {
  26771.       fheader = 0;
  26772. !     if (argfolder) {
  26773. !         (void) strcpy (folder, argfolder);
  26774. !         if (pfold (argfolder, msg)) {
  26775.           m_replace (pfolder, argfolder);
  26776.           m_update ();
  26777.           }
  26778. !         if (!frecurse)    /* recurse not done in pfold(), */
  26779. !         dodir (folder);    /* so just list all level-1 sub-folders */
  26780.       }
  26781.       else {
  26782. +         if (msg)
  26783. +         admonish (NULLCP, "no folder given for message %s", msg);
  26784.           dother ();
  26785.   
  26786.           (void) strcpy (folder, (cp = m_find (pfolder)) ? cp : "");
  26787. ***************
  26788. *** 511,524 ****
  26789.       struct stat st;
  26790.   #ifdef SYS5DIR
  26791.       register struct dirent *dp;
  26792. ! #else  SYS5DIR
  26793.       register struct direct *dp;
  26794. ! #endif SYS5DIR
  26795.       register    DIR * dd;
  26796.   
  26797.       cp = name + strlen (name);
  26798.       *cp++ = '/';
  26799. !     *cp = NULL;
  26800.   
  26801.       base = strcmp (name, "./") ? name : name + 2;/* hack */
  26802.   
  26803. --- 520,533 ----
  26804.       struct stat st;
  26805.   #ifdef SYS5DIR
  26806.       register struct dirent *dp;
  26807. ! #else /* SYS5DIR */
  26808.       register struct direct *dp;
  26809. ! #endif /* SYS5DIR */
  26810.       register    DIR * dd;
  26811.   
  26812.       cp = name + strlen (name);
  26813.       *cp++ = '/';
  26814. !     *cp = '\0';
  26815.   
  26816.       base = strcmp (name, "./") ? name : name + 2;/* hack */
  26817.   
  26818. ***************
  26819. *** 530,538 ****
  26820.       if (strcmp (dp -> d_name, ".") && strcmp (dp -> d_name, "..")) {
  26821.   #ifdef SYS5DIR
  26822.           if (cp + dp -> d_reclen + 2 >= name + BUFSIZ)
  26823. ! #else  SYS5DIR
  26824.           if (cp + strlen (dp -> d_name) + 2 >= name + BUFSIZ)
  26825. ! #endif SYS5DIR
  26826.           continue;
  26827.           (void) strcpy (cp, dp -> d_name);
  26828.           if (stat (name, &st) != NOTOK && (st.st_mode & S_IFMT) == S_IFDIR)
  26829. --- 539,547 ----
  26830.       if (strcmp (dp -> d_name, ".") && strcmp (dp -> d_name, "..")) {
  26831.   #ifdef SYS5DIR
  26832.           if (cp + dp -> d_reclen + 2 >= name + BUFSIZ)
  26833. ! #else /* SYS5DIR */
  26834.           if (cp + strlen (dp -> d_name) + 2 >= name + BUFSIZ)
  26835. ! #endif /* SYS5DIR */
  26836.           continue;
  26837.           (void) strcpy (cp, dp -> d_name);
  26838.           if (stat (name, &st) != NOTOK && (st.st_mode & S_IFMT) == S_IFDIR)
  26839. ***************
  26840. *** 540,546 ****
  26841.       }
  26842.       closedir (dd);
  26843.   
  26844. !     *--cp = NULL;
  26845.   }
  26846.   
  26847.   /*   */
  26848. --- 549,555 ----
  26849.       }
  26850.       closedir (dd);
  26851.   
  26852. !     *--cp = '\0';
  26853.   }
  26854.   
  26855.   /*   */
  26856. *** ../mh-6.7.2/uip/forw.c    Thu Apr  5 16:03:37 1990
  26857. --- uip/forw.c    Mon Dec 14 16:21:09 1992
  26858. ***************
  26859. *** 1,7 ****
  26860.   /* forw.c - forward messages */
  26861.   #ifndef    lint
  26862. ! static char ident[] = "@(#)$Id: forw.c,v 1.6 90/04/05 14:59:50 sources Exp $";
  26863. ! #endif    lint
  26864.   
  26865.   #include "../h/mh.h"
  26866.   #include "../h/formatsbr.h"
  26867. --- 1,7 ----
  26868.   /* forw.c - forward messages */
  26869.   #ifndef    lint
  26870. ! static char ident[] = "@(#)$Id: forw.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
  26871. ! #endif    /* lint */
  26872.   
  26873.   #include "../h/mh.h"
  26874.   #include "../h/formatsbr.h"
  26875. ***************
  26876. *** 9,18 ****
  26877.   #include <stdio.h>
  26878.   #include <sys/types.h>
  26879.   #include <sys/stat.h>
  26880.   
  26881.   
  26882. ! #define    IFMT    "digest-issue-%s"
  26883. ! #define    VFMT    "digest-volume-%s"
  26884.   
  26885.   static    mhl_draft(), copy_draft(), build_form();
  26886.   /*   */
  26887. --- 9,26 ----
  26888.   #include <stdio.h>
  26889.   #include <sys/types.h>
  26890.   #include <sys/stat.h>
  26891. + #ifdef LOCALE
  26892. + #include    <locale.h>
  26893. + #endif
  26894.   
  26895. + #ifndef    MIME
  26896. + #define    MIMEminc(a)    (a)
  26897. + #else    /* MIME */
  26898. + #define    MIMEminc(a)    0
  26899. + #endif    /* MIME */
  26900.   
  26901. ! #define    IFORMAT    "digest-issue-%s"
  26902. ! #define    VFORMAT    "digest-volume-%s"
  26903.   
  26904.   static    mhl_draft(), copy_draft(), build_form();
  26905.   /*   */
  26906. ***************
  26907. *** 50,84 ****
  26908.   #define    NINPLSW    12
  26909.       "noinplace", 0,
  26910.   
  26911. ! #define    DGSTSW    13
  26912.       "digest list", 0,
  26913. ! #define    ISSUESW    14
  26914.       "issue number", 0,
  26915. ! #define    VOLUMSW    15
  26916.       "volume number", 0,
  26917.   
  26918. ! #define    WHATSW    16
  26919.       "whatnowproc program", 0,
  26920. ! #define    NWHATSW    17
  26921.       "nowhatnowproc", 0,
  26922.   
  26923. ! #define    HELPSW    18
  26924.       "help", 4,
  26925.   
  26926. ! #define    FILESW    19
  26927.       "file file", -4,        /* interface from msh */
  26928.   
  26929. ! #define    DASHSW    20
  26930.       "dashmunging", -4,        /* interface to mhl */
  26931. ! #define    NDASHSW    21
  26932.       "nodashmunging", -6,
  26933.   
  26934.   #ifdef    MHE
  26935. ! #define    BILDSW    22
  26936.       "build", -5,        /* interface from mhe */
  26937. ! #endif    MHE
  26938.   
  26939. !     NULL, NULL
  26940.   };
  26941.   
  26942.   /*   */
  26943. --- 58,97 ----
  26944.   #define    NINPLSW    12
  26945.       "noinplace", 0,
  26946.   
  26947. ! #define    MIMESW    13
  26948. !     "mime", MIMEminc(-4),
  26949. ! #define    NMIMESW    14
  26950. !     "nomime", MIMEminc(-6),
  26951. ! #define    DGSTSW    15
  26952.       "digest list", 0,
  26953. ! #define    ISSUESW    16
  26954.       "issue number", 0,
  26955. ! #define    VOLUMSW    17
  26956.       "volume number", 0,
  26957.   
  26958. ! #define    WHATSW    18
  26959.       "whatnowproc program", 0,
  26960. ! #define    NWHATSW    19
  26961.       "nowhatnowproc", 0,
  26962.   
  26963. ! #define    HELPSW    20
  26964.       "help", 4,
  26965.   
  26966. ! #define    FILESW    21
  26967.       "file file", -4,        /* interface from msh */
  26968.   
  26969. ! #define    DASHSW    22
  26970.       "dashmunging", -4,        /* interface to mhl */
  26971. ! #define    NDASHSW    23
  26972.       "nodashmunging", -6,
  26973.   
  26974.   #ifdef    MHE
  26975. ! #define    BILDSW    24
  26976.       "build", -5,        /* interface from mhe */
  26977. ! #endif    /* MHE */
  26978.   
  26979. !     NULL, 0
  26980.   };
  26981.   
  26982.   /*   */
  26983. ***************
  26984. *** 95,101 ****
  26985.   #define NEWSW    4
  26986.       "new", 0,
  26987.   
  26988. !     NULL, NULL
  26989.   };
  26990.   
  26991.   
  26992. --- 108,114 ----
  26993.   #define NEWSW    4
  26994.       "new", 0,
  26995.   
  26996. !     NULL, 0
  26997.   };
  26998.   
  26999.   
  27000. ***************
  27001. *** 105,111 ****
  27002.       "list", 0,
  27003.       "refile +folder", 0,
  27004.   
  27005. !     NULL, NULL
  27006.   };
  27007.   
  27008.   /*   */
  27009. --- 118,124 ----
  27010.       "list", 0,
  27011.       "refile +folder", 0,
  27012.   
  27013. !     NULL, 0
  27014.   };
  27015.   
  27016.   /*   */
  27017. ***************
  27018. *** 133,144 ****
  27019.       int     msgp = 0,
  27020.               anot = 0,
  27021.               inplace = 0,
  27022.           issue = 0,
  27023.           volume = 0,
  27024.           dashflg = 1,
  27025.   #ifdef    MHE
  27026.           buildsw = 0,
  27027. ! #endif    MHE
  27028.           nedit = 0,
  27029.           nwhat = 0,
  27030.           i,
  27031. --- 146,158 ----
  27032.       int     msgp = 0,
  27033.               anot = 0,
  27034.               inplace = 0,
  27035. +         mime = 0,
  27036.           issue = 0,
  27037.           volume = 0,
  27038.           dashflg = 1,
  27039.   #ifdef    MHE
  27040.           buildsw = 0,
  27041. ! #endif    /* MHE */
  27042.           nedit = 0,
  27043.           nwhat = 0,
  27044.           i,
  27045. ***************
  27046. *** 165,170 ****
  27047. --- 179,187 ----
  27048.              *msgs[MAXARGS];
  27049.       struct stat st;
  27050.   
  27051. + #ifdef LOCALE
  27052. +     setlocale(LC_ALL, "");
  27053. + #endif
  27054.       invo_name = r1bindex (argv[0], '/');
  27055.       if ((cp = m_find (invo_name)) != NULL) {
  27056.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  27057. ***************
  27058. *** 215,221 ****
  27059.   #ifdef    MHE
  27060.           case BILDSW:
  27061.               buildsw++;    /* fall... */
  27062. ! #endif    MHE
  27063.           case NWHATSW: 
  27064.               nwhat++;
  27065.               continue;
  27066. --- 232,238 ----
  27067.   #ifdef    MHE
  27068.           case BILDSW:
  27069.               buildsw++;    /* fall... */
  27070. ! #endif    /* MHE */
  27071.           case NWHATSW: 
  27072.               nwhat++;
  27073.               continue;
  27074. ***************
  27075. *** 231,236 ****
  27076. --- 248,254 ----
  27077.               if (!(cp = *argp++) || *cp == '-')
  27078.               adios (NULLCP, "missing argument to %s", argp[-2]);
  27079.               filter = getcpy (libpath (cp));
  27080. +             mime = 0;
  27081.               continue;
  27082.           case FORMSW: 
  27083.               if (!(form = *argp++) || *form == '-')
  27084. ***************
  27085. *** 251,259 ****
  27086. --- 269,288 ----
  27087.               inplace = 0;
  27088.               continue;
  27089.   
  27090. +         case MIMESW:
  27091. + #ifdef    MIME
  27092. +             mime++;
  27093. +             filter = NULL;
  27094. + #endif
  27095. +             continue;
  27096. +         case NMIMESW: 
  27097. +             mime = 0;
  27098. +             continue;
  27099.           case DGSTSW: 
  27100.               if (!(digest = *argp++) || *digest == '-')
  27101.               adios (NULLCP, "missing argument to %s", argp[-2]);
  27102. +             mime = 0;
  27103.               continue;
  27104.           case ISSUESW:
  27105.               if (!(cp = *argp++) || *cp == '-')
  27106. ***************
  27107. *** 317,327 ****
  27108.   #ifndef MHE
  27109.       (void) strcpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf));
  27110.       if (stat (drft, &st) != NOTOK) {
  27111. ! #else    MHE
  27112.       (void) strcpy (drft, buildsw ? m_maildir ("draft")
  27113.                 : m_draft (dfolder, NULLCP, NOUSE, &isdf));
  27114.       if (!buildsw && stat (drft, &st) != NOTOK) {
  27115. ! #endif    MHE
  27116.       printf ("Draft \"%s\" exists (%ld bytes).", drft, st.st_size);
  27117.       for (i = LISTDSW; i != YESW;) {
  27118.           if (!(argp = getans ("\nDisposition? ", isdf ? aqrnl : aqrl)))
  27119. --- 346,356 ----
  27120.   #ifndef MHE
  27121.       (void) strcpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf));
  27122.       if (stat (drft, &st) != NOTOK) {
  27123. ! #else    /* MHE */
  27124.       (void) strcpy (drft, buildsw ? m_maildir ("draft")
  27125.                 : m_draft (dfolder, NULLCP, NOUSE, &isdf));
  27126.       if (!buildsw && stat (drft, &st) != NOTOK) {
  27127. ! #endif    /* MHE */
  27128.       printf ("Draft \"%s\" exists (%ld bytes).", drft, st.st_size);
  27129.       for (i = LISTDSW; i != YESW;) {
  27130.           if (!(argp = getans ("\nDisposition? ", isdf ? aqrnl : aqrl)))
  27131. ***************
  27132. *** 381,387 ****
  27133.   
  27134.       if (digest) {
  27135.       if (issue == 0) {
  27136. !         (void) sprintf (buf, IFMT, digest);
  27137.           if (volume == 0
  27138.               && (cp = m_find (buf))
  27139.               && ((issue = atoi (cp)) < 0))
  27140. --- 410,416 ----
  27141.   
  27142.       if (digest) {
  27143.       if (issue == 0) {
  27144. !         (void) sprintf (buf, IFORMAT, digest);
  27145.           if (volume == 0
  27146.               && (cp = m_find (buf))
  27147.               && ((issue = atoi (cp)) < 0))
  27148. ***************
  27149. *** 389,395 ****
  27150.           issue++;
  27151.       }
  27152.       if (volume == 0)
  27153. !         (void) sprintf (buf, VFMT, digest);
  27154.           if ((cp = m_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
  27155.           volume = 1;
  27156.       if (!form)
  27157. --- 418,424 ----
  27158.           issue++;
  27159.       }
  27160.       if (volume == 0)
  27161. !         (void) sprintf (buf, VFORMAT, digest);
  27162.           if ((cp = m_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
  27163.           volume = 1;
  27164.       if (!form)
  27165. ***************
  27166. *** 427,440 ****
  27167.       if (filter)
  27168.       mhl_draft (out, digest, volume, issue, drft, filter, dashflg);
  27169.       else
  27170. !     copy_draft (out, digest, drft, volume, issue);
  27171.       (void) close (out);
  27172.   
  27173.       if (digest) {
  27174. !     (void) sprintf (buf, IFMT, digest);
  27175.       (void) sprintf (value, "%d", issue);
  27176.       m_replace (buf, getcpy (value));
  27177. !     (void) sprintf (buf, VFMT, digest);
  27178.       (void) sprintf (value, "%d", volume);
  27179.       m_replace (buf, getcpy (value));
  27180.       }
  27181. --- 456,469 ----
  27182.       if (filter)
  27183.       mhl_draft (out, digest, volume, issue, drft, filter, dashflg);
  27184.       else
  27185. !     copy_draft (out, digest, drft, volume, issue, mime);
  27186.       (void) close (out);
  27187.   
  27188.       if (digest) {
  27189. !     (void) sprintf (buf, IFORMAT, digest);
  27190.       (void) sprintf (value, "%d", issue);
  27191.       m_replace (buf, getcpy (value));
  27192. !     (void) sprintf (buf, VFORMAT, digest);
  27193.       (void) sprintf (value, "%d", volume);
  27194.       m_replace (buf, getcpy (value));
  27195.       }
  27196. ***************
  27197. *** 448,454 ****
  27198.   edit_it: ;
  27199.       if (nwhat)
  27200.       done (0);
  27201. !     (void) m_whatnow (ed, nedit, NOUSE, drft, NULLCP, 0, mp,
  27202.       anot ? "Forwarded" : NULLCP, inplace, cwd);
  27203.       done (1);
  27204.   }
  27205. --- 477,483 ----
  27206.   edit_it: ;
  27207.       if (nwhat)
  27208.       done (0);
  27209. !     (void) what_now (ed, nedit, NOUSE, drft, NULLCP, 0, mp,
  27210.       anot ? "Forwarded" : NULLCP, inplace, cwd);
  27211.       done (1);
  27212.   }
  27213. ***************
  27214. *** 525,534 ****
  27215.   
  27216.   /*   */
  27217.   
  27218. ! static    copy_draft (out, digest, file, volume, issue)
  27219.   int     out,
  27220.           volume,
  27221. !         issue;
  27222.   register char   *digest,
  27223.           *file;
  27224.   {
  27225. --- 554,564 ----
  27226.   
  27227.   /*   */
  27228.   
  27229. ! static    copy_draft (out, digest, file, volume, issue, mime)
  27230.   int     out,
  27231.           volume,
  27232. !         issue,
  27233. !     mime;
  27234.   register char   *digest,
  27235.           *file;
  27236.   {
  27237. ***************
  27238. *** 539,544 ****
  27239. --- 569,589 ----
  27240.                      *msgnam;
  27241.       char    buffer[BUFSIZ];
  27242.   
  27243. + #ifdef MIME
  27244. +     if (mime) {
  27245. +     (void) sprintf (buffer, "#forw [] +%s", mp -> foldpath);
  27246. +     (void) write (out, buffer, strlen (buffer));
  27247. +     for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
  27248. +         if (mp -> msgstats[msgnum] & SELECTED) {
  27249. +         (void) sprintf (buffer, " %s", m_name (msgnum));
  27250. +         (void) write (out, buffer, strlen (buffer));
  27251. +         }
  27252. +     (void) write (out, "\n", 1);
  27253. +     return;
  27254. +     }
  27255. + #endif /* MIME */
  27256.       msgcnt = 1;
  27257.       for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
  27258.       if (mp -> msgstats[msgnum] & SELECTED) {
  27259. ***************
  27260. *** 580,586 ****
  27261.       for (bp = buffer + i; i > 1; i--)
  27262.           *bp++ = '*';
  27263.       *bp++ = '\n';
  27264. !     *bp = NULL;
  27265.       (void) write (out, buffer, strlen (buffer));
  27266.       }
  27267.   }
  27268. --- 625,631 ----
  27269.       for (bp = buffer + i; i > 1; i--)
  27270.           *bp++ = '*';
  27271.       *bp++ = '\n';
  27272. !     *bp = 0;
  27273.       (void) write (out, buffer, strlen (buffer));
  27274.       }
  27275.   }
  27276. ***************
  27277. *** 601,607 ****
  27278.       register    FILE *tmp;
  27279.       register struct comp *cptr;
  27280.       struct format *fmt;
  27281. !     int     dat[4];
  27282.   
  27283.       nfs = new_fs (form, NULLCP, NULLCP);
  27284.       fmtsize = strlen (nfs) + 256;
  27285. --- 646,652 ----
  27286.       register    FILE *tmp;
  27287.       register struct comp *cptr;
  27288.       struct format *fmt;
  27289. !     int     dat[5];
  27290.   
  27291.       nfs = new_fs (form, NULLCP, NULLCP);
  27292.       fmtsize = strlen (nfs) + 256;
  27293. ***************
  27294. *** 618,623 ****
  27295. --- 663,669 ----
  27296.       dat[1] = volume;
  27297.       dat[2] = 0;
  27298.       dat[3] = fmtsize;
  27299. +     dat[4] = 0;
  27300.   
  27301.       (void) strcpy (tmpfil, m_tmpfil (invo_name));
  27302.       if ((tmp = fopen (tmpfil, "w+")) == NULL)
  27303. *** /dev/null    Tue Dec 15 08:01:10 1992
  27304. --- uip/ftpsbr.c    Thu Dec  3 08:50:36 1992
  27305. ***************
  27306. *** 0 ****
  27307. --- 1,601 ----
  27308. + /* ftpsbr.c - simple FTP client library (why doesn't BSD have one?!?) */
  27309. + #ifndef    lint
  27310. + static char ident[] = "@(#)$Id: ftpsbr.c,v 1.10 1992/12/03 16:50:27 jromine Exp $";
  27311. + #endif
  27312. + #include "../h/mh.h"
  27313. + #include "../h/mhn.h"
  27314. + #ifdef    FTP
  27315. + #include <ctype.h>
  27316. + #ifdef SVR4
  27317. + #undef NULLVP          /* stdio.h */
  27318. + #endif
  27319. + #include <stdio.h>
  27320. + #include <arpa/ftp.h>
  27321. + #ifdef __STDC__
  27322. + #include <stdarg.h>
  27323. + #else
  27324. + #include <varargs.h>
  27325. + #endif
  27326. + #ifdef __STDC__
  27327. + static int    command(int arg1, ...);
  27328. + #else
  27329. + static int    command();
  27330. + #endif
  27331. + static int  ftp_quit(), ftp_read(), initconn(),
  27332. +         dataconn(), _command(), getreply();
  27333. + /*     DATA */
  27334. + #define    v_debug        debugsw
  27335. + #define    v_verbose    verbosw
  27336. + static    int    ftp_fd = NOTOK;
  27337. + static    int    data_fd = NOTOK;
  27338. + static    int    v_noise;
  27339. + extern    int    v_debug;
  27340. + extern    int    v_verbose;
  27341. + /*   */
  27342. + #if    defined(SYS5) && defined(AUX)
  27343. + #define u_short ushort
  27344. + #define u_long  ulong
  27345. + #endif
  27346. + /* taken from ISODE's compat/internet.c */
  27347. + #include <sys/types.h>
  27348. + #include <sys/socket.h>
  27349. + #include <netinet/in.h>
  27350. + #include <netdb.h>
  27351. + #if    defined(BIND) && !defined(h_addr)
  27352. + #define    h_addr    h_addr_list[0]
  27353. + #endif
  27354. + #define    inaddr_copy(hp,sin) \
  27355. +     bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
  27356. + #ifndef    DG
  27357. + u_long    inet_addr ();
  27358. + #else
  27359. + struct in_addr inet_addr ();
  27360. + #endif
  27361. + static char *empty = NULL;
  27362. + #ifdef    h_addr
  27363. + static char *addrs[2] = { NULL };
  27364. + #endif
  27365. + static struct hostent *gethostbystring (s)
  27366. + char   *s;
  27367. + {
  27368. +     register struct hostent *h;
  27369. + #ifndef    DG
  27370. +     static u_long iaddr;
  27371. + #else
  27372. +     static struct in_addr iaddr;
  27373. + #endif
  27374. +     static struct hostent   hs;
  27375. +     iaddr = inet_addr (s);
  27376. + #ifndef    DG
  27377. +     if (iaddr == NOTOK && strcmp (s, "255.255.255.255"))
  27378. + #else
  27379. +     if (iaddr.s_addr == NOTOK && strcmp (s, "255.255.255.255"))
  27380. + #endif
  27381. +     return gethostbyname (s);
  27382. +     h = &hs;
  27383. +     h -> h_name = s;
  27384. +     h -> h_aliases = ∅
  27385. +     h -> h_addrtype = AF_INET;
  27386. +     h -> h_length = sizeof (iaddr);
  27387. + #ifdef    h_addr
  27388. +     h -> h_addr_list = addrs;
  27389. +     bzero ((char *) addrs, sizeof addrs);
  27390. + #endif
  27391. +     h -> h_addr = (char *) &iaddr;
  27392. +     return h;
  27393. + }
  27394. + /*   */
  27395. + extern    int    errno;
  27396. + extern    int    sys_nerr;
  27397. + extern    char   *sys_errlist[];
  27398. + #define    start_tcp_client(sock,priv) \
  27399. +         socket (AF_INET, SOCK_STREAM, 0)
  27400. + #define    join_tcp_server(fd, sock) \
  27401. +         connect ((fd), (struct sockaddr *) (sock), sizeof *(sock))
  27402. + /* ARGSUSED */
  27403. + static int  start_tcp_server (sock, backlog, opt1, opt2)
  27404. + struct sockaddr_in *sock;
  27405. + int    backlog,
  27406. +     opt1,
  27407. +     opt2;
  27408. + {
  27409. +     int        eindex,
  27410. +         sd;
  27411. +     if ((sd = socket (AF_INET, SOCK_STREAM, 0)) == NOTOK)
  27412. +     return NOTOK;
  27413. +     if (bind (sd, (struct sockaddr *) sock, sizeof *sock) == NOTOK) {
  27414. +     eindex = errno;
  27415. +     (void) close (sd);
  27416. +     errno = eindex;
  27417. +     }
  27418. +     else
  27419. +     (void) listen (sd, backlog);
  27420. +     return sd;
  27421. + }
  27422. + static    int    __len__;
  27423. + #define    join_tcp_client(fd,sock) \
  27424. +         accept ((fd), (struct sockaddr *) (sock), \
  27425. +         (__len__ = sizeof *(sock), &__len__))
  27426. + #define    read_tcp_socket        read
  27427. + #define    write_tcp_socket    write
  27428. + #define    close_tcp_socket    close
  27429. + /*   */
  27430. + static void  _asprintf (bp, what, ap)    /* fmt, args, ... */
  27431. + register char *bp;
  27432. + char   *what;
  27433. + va_list    ap;
  27434. + {
  27435. +     register int    eindex;
  27436. +     char   *fmt;
  27437. +     eindex = errno;
  27438. +     *bp = '\0';
  27439. +     fmt = va_arg (ap, char *);
  27440. +     if (fmt) {
  27441. + #ifndef    VSPRINTF
  27442. +     struct _iobuf iob;
  27443. + #endif
  27444. + #ifndef    VSPRINTF
  27445. + #ifdef    pyr
  27446. +     bzero ((char *) &iob, sizeof iob);
  27447. +     iob._file = _NFILE;
  27448. + #endif
  27449. +     iob._flag = _IOWRT | _IOSTRG;
  27450. + #if    !defined(vax) && !defined(pyr) && !defined(sequent)
  27451. +     iob._ptr = (unsigned char *) bp;
  27452. + #else
  27453. +     iob._ptr = bp;
  27454. + #endif
  27455. +     iob._cnt = BUFSIZ;
  27456. +     _doprnt (fmt, ap, &iob);
  27457. +     (void) putc ('\0', &iob);
  27458. + #else
  27459. +     (void) vsprintf (bp, fmt, ap);
  27460. + #endif
  27461. +     bp += strlen (bp);
  27462. +     }
  27463. +     if (what) {
  27464. +     if (*what) {
  27465. +         (void) sprintf (bp, " %s: ", what);
  27466. +         bp += strlen (bp);
  27467. +     }
  27468. +     if (0 < eindex && eindex < sys_nerr)
  27469. +         (void) strcpy (bp, sys_errlist[eindex]);
  27470. +     else
  27471. +         (void) sprintf (bp, "Error %d", eindex);
  27472. +     bp += strlen (bp);
  27473. +     }
  27474. +     errno = eindex;
  27475. + }
  27476. + /*   */
  27477. + int    ftp_get (host, user, password, cwd, remote, local, ascii, stayopen)
  27478. + char   *host,
  27479. +        *user,
  27480. +        *password,
  27481. +        *cwd,
  27482. +        *remote,
  27483. +        *local;
  27484. + int    ascii,
  27485. +     stayopen;
  27486. + {
  27487. +     int        result;
  27488. +     if (stayopen <= 0) {
  27489. +     result = ftp_quit ();
  27490. +     if (host == NULL)
  27491. +         return result;
  27492. +     }
  27493. +     if (ftp_fd == NOTOK) {
  27494. +     struct sockaddr_in in_socket;
  27495. +     register struct hostent *hp;
  27496. +     register struct servent *sp;
  27497. +     if ((sp = getservbyname ("ftp", "tcp")) == NULL) {
  27498. +         fprintf (stderr, "tcp/ftp: unknown service");
  27499. +         return NOTOK;
  27500. +     }
  27501. +     if ((hp = gethostbystring (host)) == NULL) {
  27502. +         fprintf (stderr, "%s: unknown host\n", host);
  27503. +         return NOTOK;
  27504. +     }
  27505. +     in_socket.sin_family = hp -> h_addrtype;
  27506. +     inaddr_copy (hp, &in_socket);
  27507. +     in_socket.sin_port = sp -> s_port;
  27508. +     if ((ftp_fd = start_tcp_client ((struct sockaddr_in *) NULL, 0))
  27509. +             == NOTOK) {
  27510. +         perror (host);
  27511. +         return NOTOK;
  27512. +     }
  27513. +     if (join_tcp_server (ftp_fd, &in_socket) == NOTOK) {
  27514. +         perror (host);
  27515. +         (void) close_tcp_socket (ftp_fd), ftp_fd = NOTOK;
  27516. +         return NOTOK;
  27517. +     }
  27518. +     (void) getreply (1, 0);
  27519. +     if (v_verbose) {
  27520. +         fprintf (stdout, "Connected to %s\n", host);
  27521. +         (void) fflush (stdout);
  27522. +     }
  27523. +     if (user) {
  27524. +         if ((result = command (0, "USER %s", user)) == CONTINUE)
  27525. +         result = command (1, "PASS %s", password);
  27526. +         if (result != COMPLETE) {
  27527. +         result = NOTOK;
  27528. +         goto out;
  27529. +         }
  27530. +     }
  27531. +     if (remote == NULL)
  27532. +         return OK;
  27533. +     }
  27534. +     if (cwd && ((result = command (0, "CWD %s", cwd)) != COMPLETE
  27535. +             && result != CONTINUE)) {
  27536. +     result = NOTOK;
  27537. +     goto out;
  27538. +     }
  27539. +     if (command (1, ascii ? "TYPE A" : "TYPE I") != COMPLETE) {
  27540. +     result = NOTOK;
  27541. +     goto out;
  27542. +     }
  27543. +     result = ftp_read (remote, local, ascii);
  27544. + out: ;
  27545. +     if (result != OK || !stayopen)
  27546. +     (void) ftp_quit ();
  27547. +     return result;
  27548. + }
  27549. + /*   */
  27550. + static int  ftp_quit ()
  27551. + {
  27552. +     int        n;
  27553. +     if (ftp_fd == NOTOK)
  27554. +     return OK;
  27555. +     n = command (1, "QUIT");
  27556. +     (void) close_tcp_socket (ftp_fd), ftp_fd = NOTOK;
  27557. +     return (n == 0 || n == COMPLETE ? OK : NOTOK);
  27558. + }
  27559. + /*   */
  27560. + static int  ftp_read (remote, local, ascii)
  27561. + char    *remote,
  27562. +     *local;
  27563. + int    ascii;
  27564. + {
  27565. +     register int    cc;
  27566. +     int        expectingreply = 0;
  27567. +     char    buffer[BUFSIZ];
  27568. +     FILE   *fp;
  27569. +     if (initconn () == NOTOK)
  27570. +     goto bad;
  27571. +     v_noise = v_verbose;
  27572. +     if (command (-1, "RETR %s", remote) != PRELIM)
  27573. +     goto bad;
  27574. +     expectingreply++;
  27575. +     if (dataconn () == NOTOK) {
  27576. + bad: ;
  27577. +     if (data_fd != NOTOK)
  27578. +         (void) close_tcp_socket (data_fd), data_fd = NOTOK;
  27579. +     if (expectingreply)
  27580. +         (void) getreply (-2, 0);
  27581. +     return NOTOK;
  27582. +     }
  27583. +     if ((fp = fopen (local, "w")) == NULL) {
  27584. +     perror (local);
  27585. +     goto bad;
  27586. +     }
  27587. +     if (ascii) {
  27588. +     int    c;
  27589. +     FILE   *in;
  27590. +     if (!(in = fdopen (data_fd, "r"))) {
  27591. +         perror ("fdopen");
  27592. +         goto bad;
  27593. +     }
  27594. +     while ((c = getc (in)) != EOF) {
  27595. +         if (c == '\r')
  27596. +         switch (c = getc (in)) {
  27597. +             case EOF:
  27598. +             case '\0':
  27599. +                 c = '\r';
  27600. +             break;
  27601. +             case '\n':
  27602. +             break;
  27603. +             default:
  27604. +             (void) putc ('\r', fp);
  27605. +             break;
  27606. +         }
  27607. +         if (putc (c, fp) == EOF) {
  27608. +         perror ("putc");
  27609. +         (void) fclose (in);
  27610. +         data_fd = NOTOK;
  27611. +         goto bad;
  27612. +         }
  27613. +     }
  27614. +     (void) fclose (in);
  27615. +     data_fd = NOTOK;
  27616. +     }
  27617. +     else {
  27618. +     while ((cc = read_tcp_socket (data_fd, buffer, sizeof buffer)) > 0)
  27619. +         if (fwrite (buffer, sizeof *buffer, cc, fp) == 0) {
  27620. +         perror ("fwrite");
  27621. +         goto bad;
  27622. +         }
  27623. +     if (cc < 0) {
  27624. +         perror ("read_tcp_socket");
  27625. +         goto bad;
  27626. +     }
  27627. +     (void) close_tcp_socket (data_fd), data_fd = NOTOK;
  27628. +     }
  27629. +     (void) fclose (fp);
  27630. +     v_noise = v_verbose;
  27631. +     return (getreply (1, 0) == COMPLETE ? OK : NOTOK);
  27632. + }
  27633. + /*   */
  27634. + static int  initconn ()
  27635. + {
  27636. +     int        len;
  27637. +     register char  *a,
  27638. +            *p;
  27639. +     struct sockaddr_in in_socket;
  27640. +     if (getsockname (ftp_fd, (struct sockaddr *) &in_socket,
  27641. +              (len = sizeof in_socket, &len)) == NOTOK) {
  27642. +     perror ("getsockname");
  27643. +     return NOTOK;
  27644. +     }
  27645. +     in_socket.sin_port = 0;
  27646. +     if ((data_fd = start_tcp_server (&in_socket, 1, 0, 0)) == NOTOK) {
  27647. +     perror ("start_tcp_server");
  27648. +     return NOTOK;
  27649. +     }
  27650. +     if (getsockname (data_fd, (struct sockaddr *) &in_socket,
  27651. +              (len = sizeof in_socket, &len)) == NOTOK) {
  27652. +     perror ("getsockname");
  27653. +     return NOTOK;
  27654. +     }
  27655. +     a = (char *) &in_socket.sin_addr;
  27656. +     p = (char *) &in_socket.sin_port;
  27657. + #define    UC(b)    (((int) b) & 0xff)
  27658. +     if (command (1, "PORT %d,%d,%d,%d,%d,%d",
  27659. +               UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]),
  27660. +               UC(p[0]), UC(p[1])) == COMPLETE)
  27661. +     return OK;
  27662. +     return NOTOK;
  27663. + }
  27664. + /*   */
  27665. + static int  dataconn ()
  27666. + {
  27667. +     int        fd;
  27668. +     struct sockaddr_in in_socket;
  27669. +     
  27670. +     if ((fd = join_tcp_client (data_fd, &in_socket)) == NOTOK) {
  27671. +     perror ("join_tcp_client");
  27672. +     return NOTOK;
  27673. +     }
  27674. +     (void) close_tcp_socket (data_fd);
  27675. +     data_fd = fd;
  27676. +     return OK;
  27677. + }
  27678. + /*   */
  27679. + #ifndef    lint
  27680. + #ifdef __STDC__
  27681. + static int  command (int arg1, ...)
  27682. + {
  27683. +     int        val;
  27684. +     va_list ap;
  27685. +     va_start (ap, arg1);
  27686. +     val = _command (arg1, ap);
  27687. +     va_end (ap);
  27688. +     return val;
  27689. + }
  27690. + #else
  27691. + static int  command (va_alist)
  27692. + va_dcl
  27693. + {
  27694. +     int        val;
  27695. +     va_list ap;
  27696. +     va_start (ap);
  27697. +     val = _command (va_arg (ap, int), ap);
  27698. +     va_end (ap);
  27699. +     return val;
  27700. + }
  27701. + #endif
  27702. + static int  _command (complete, ap)
  27703. + int complete;
  27704. + va_list ap;
  27705. + {
  27706. +     int        len;
  27707. +     char    buffer[BUFSIZ];
  27708. +     if (ftp_fd == NOTOK)
  27709. +     return NOTOK;
  27710. +     _asprintf (buffer, NULLCP, ap);
  27711. +     if (v_debug)
  27712. +     fprintf (stderr, "<--- %s\n", buffer);
  27713. +     (void) strcat (buffer, "\r\n");
  27714. +     len = strlen (buffer);
  27715. +     if (write_tcp_socket (ftp_fd, buffer, len) != len) {
  27716. +     perror ("write_tcp_socket");
  27717. +     return NOTOK;
  27718. +     }
  27719. +     return (getreply (complete, !strcmp (buffer, "QUIT")));
  27720. + }
  27721. + #else
  27722. + /* VARARGS2 */
  27723. + static int  command (complete, fmt)
  27724. + int    complete;
  27725. + char   *fmt;
  27726. + {
  27727. +     return command (complete, fmt);
  27728. + }
  27729. + #endif
  27730. + /*   */
  27731. + static int  getreply (complete, expecteof)
  27732. + int    complete,
  27733. +     expecteof;
  27734. + {
  27735. +     for (;;) {
  27736. +     register int code,
  27737. +              dig,
  27738. +              n;
  27739. +     int    continuation;
  27740. +     register char *bp;
  27741. +     char    buffer[BUFSIZ];
  27742. +     code = dig = n = continuation = 0;
  27743. +     bp = buffer;
  27744. +     for (;;) {
  27745. +         char    c;
  27746. +         if (read_tcp_socket (ftp_fd, &c, 1) < 1) {
  27747. +         if (expecteof)
  27748. +             return OK;
  27749. +         perror ("read_tcp_socket");
  27750. +         return DONE;
  27751. +         }
  27752. +         if (c == '\n')
  27753. +         break;
  27754. +         *bp++ = c != '\r' ? c : '\0';
  27755. +         dig++;
  27756. +         if (dig < 4) {
  27757. +         if (isdigit(c))
  27758. +             code = code * 10 + (c - '0');
  27759. +         else                /* XXX: naughty FTP... */
  27760. +             if (isspace (c))
  27761. +             continuation++;
  27762. +         }
  27763. +         else
  27764. +         if (dig == 4 && c == '-')
  27765. +             continuation++;
  27766. +         if (n == 0)
  27767. +         n = c;
  27768. +     }
  27769. +     if (v_debug)
  27770. +         fprintf (stderr, "---> %s\n", buffer);
  27771. +     if (continuation)
  27772. +         continue;
  27773. +     n -= '0';
  27774. +     if (v_noise) {
  27775. +         fprintf (stdout, "%s\n", buffer);
  27776. +         (void) fflush (stdout);
  27777. +         v_noise = 0;
  27778. +     }
  27779. +     else
  27780. +         if ((complete == -1 && n != PRELIM)
  27781. +             || (complete == 0 && n != CONTINUE && n != COMPLETE)
  27782. +             || (complete == 1 && n != COMPLETE))
  27783. +         fprintf (stderr, "%s\n", buffer);
  27784. +     return n;
  27785. +     }
  27786. + }
  27787. + #endif
  27788. *** ../mh-6.7.2/uip/inc.c    Thu Apr  5 16:03:29 1990
  27789. --- uip/inc.c    Mon Dec 14 16:21:11 1992
  27790. ***************
  27791. *** 1,12 ****
  27792.   /* inc.c - incorporate messages from a maildrop into a folder */
  27793.   #ifndef    lint
  27794. ! static char ident[] = "@(#)$Id: inc.c,v 1.4 90/04/05 14:57:51 sources Exp $";
  27795. ! #endif    lint
  27796.   
  27797.   #include "../h/mh.h"
  27798.   #ifdef    POP
  27799.   #include "../h/dropsbr.h"
  27800. ! #endif    POP
  27801.   #include "../h/formatsbr.h"
  27802.   #include "../h/scansbr.h"
  27803.   #include "../zotnet/tws.h"
  27804. --- 1,30 ----
  27805.   /* inc.c - incorporate messages from a maildrop into a folder */
  27806.   #ifndef    lint
  27807. ! static char ident[] = "@(#)$Id: inc.c,v 1.20 1992/12/15 00:20:22 jromine Exp $";
  27808. ! #endif    /* lint */
  27809.   
  27810. + #ifdef    MAILGROUP
  27811. + /* Revised: Sat Apr 14 17:08:17 PDT 1990 (marvit@hplabs)
  27812. +  *    Added hpux hacks to set and reset gid to be "mail" as needed. The reset
  27813. +  *    is necessary so inc'ed mail is the group of the inc'er, rather than
  27814. +  *    "mail". We setgid to egid only when [un]locking the mail file. This
  27815. +  *    is also a major security precaution which will not be explained here.
  27816. +  *
  27817. +  * Fri Feb  7 16:04:57 PST 1992        John Romine <bug-mh@ics.uci.edu>
  27818. +  *   NB: I'm not 100% sure that this setgid stuff is secure even now.
  27819. +  */
  27820. + #endif
  27821.   #include "../h/mh.h"
  27822.   #ifdef    POP
  27823.   #include "../h/dropsbr.h"
  27824. ! #endif
  27825. ! #ifdef KPOP
  27826. ! #include <krb.h>
  27827. ! #endif
  27828. ! #ifdef HESIOD
  27829. ! #include <hesiod.h>
  27830. ! #endif
  27831.   #include "../h/formatsbr.h"
  27832.   #include "../h/scansbr.h"
  27833.   #include "../zotnet/tws.h"
  27834. ***************
  27835. *** 16,47 ****
  27836.   #include <signal.h>
  27837.   #include <sys/types.h>
  27838.   #include <sys/stat.h>
  27839.   
  27840.   /*   */
  27841.   
  27842.   #ifndef    MF
  27843.   #define    MFminc(a)    (a)
  27844. ! #else    MF
  27845.   #define    MFminc(a)    0
  27846. ! #endif    MF
  27847.   
  27848.   #ifndef    POP
  27849.   #define    POPminc(a)    (a)
  27850. ! #else    POP
  27851.   #define    POPminc(a)    0
  27852. ! #endif    POP
  27853.   
  27854.   #ifndef    RPOP
  27855.   #define    RPOPminc(a)    (a)
  27856. ! #else    RPOP
  27857.   #define    RPOPminc(a)    0
  27858. ! #endif    RPOP
  27859.   
  27860.   #ifndef    TMA
  27861.   #define    TMAminc(a)    (a)
  27862. ! #else    TMA
  27863.   #define    TMAminc(a)    0
  27864. ! #endif    TMA
  27865.   
  27866.   static struct swit  switches[] = {
  27867.   #define    AUDSW    0
  27868. --- 34,74 ----
  27869.   #include <signal.h>
  27870.   #include <sys/types.h>
  27871.   #include <sys/stat.h>
  27872. + #ifdef LOCALE
  27873. + #include    <locale.h>
  27874. + #endif
  27875.   
  27876.   /*   */
  27877.   
  27878.   #ifndef    MF
  27879.   #define    MFminc(a)    (a)
  27880. ! #else    /* MF */
  27881.   #define    MFminc(a)    0
  27882. ! #endif    /* MF */
  27883.   
  27884.   #ifndef    POP
  27885.   #define    POPminc(a)    (a)
  27886. ! #else    /* POP */
  27887.   #define    POPminc(a)    0
  27888. ! #endif    /* POP */
  27889.   
  27890.   #ifndef    RPOP
  27891.   #define    RPOPminc(a)    (a)
  27892. ! #else    /* RPOP */
  27893.   #define    RPOPminc(a)    0
  27894. ! #endif    /* RPOP */
  27895.   
  27896. + #ifndef    APOP
  27897. + #define    APOPminc(a)    (a)
  27898. + #else
  27899. + #define    APOPminc(a)    0
  27900. + #endif    /* APOP */
  27901.   #ifndef    TMA
  27902.   #define    TMAminc(a)    (a)
  27903. ! #else    /* TMA */
  27904.   #define    TMAminc(a)    0
  27905. ! #endif    /* TMA */
  27906.   
  27907.   static struct swit  switches[] = {
  27908.   #define    AUDSW    0
  27909. ***************
  27910. *** 76,108 ****
  27911.   #define    NPACKSW    12
  27912.       "nopack", POPminc (-6),
  27913.   
  27914. ! #define    RPOPSW    13
  27915.       "rpop", RPOPminc (-4),
  27916. ! #define    NRPOPSW    14
  27917.       "norpop", RPOPminc (-6),
  27918.   
  27919. ! #define    SILSW    15
  27920.       "silent", 0,
  27921. ! #define    NSILSW    16
  27922.       "nosilent", 0,
  27923.   
  27924. ! #define    TRNCSW    17
  27925.       "truncate", 0,
  27926. ! #define    NTRNCSW    18
  27927.       "notruncate", 0,
  27928.   
  27929. ! #define    UUCPSW    19
  27930.       "uucp", MFminc (-4),
  27931. ! #define    NUUCPSW    20
  27932.       "nouucp", MFminc (-6),
  27933.   
  27934. ! #define    WIDSW    21
  27935.       "width columns", 0,
  27936.   
  27937. ! #define    HELPSW    22
  27938.       "help", 4,
  27939.   
  27940. !     NULL, NULL
  27941.   };
  27942.   
  27943.   /*   */
  27944. --- 103,140 ----
  27945.   #define    NPACKSW    12
  27946.       "nopack", POPminc (-6),
  27947.   
  27948. ! #define    APOPSW    13
  27949. !     "apop", APOPminc (-4),
  27950. ! #define    NAPOPSW    14
  27951. !     "noapop", APOPminc (-6),
  27952. ! #define    RPOPSW    15
  27953.       "rpop", RPOPminc (-4),
  27954. ! #define    NRPOPSW    16
  27955.       "norpop", RPOPminc (-6),
  27956.   
  27957. ! #define    SILSW    17
  27958.       "silent", 0,
  27959. ! #define    NSILSW    18
  27960.       "nosilent", 0,
  27961.   
  27962. ! #define    TRNCSW    19
  27963.       "truncate", 0,
  27964. ! #define    NTRNCSW    20
  27965.       "notruncate", 0,
  27966.   
  27967. ! #define    UUCPSW    21
  27968.       "uucp", MFminc (-4),
  27969. ! #define    NUUCPSW    22
  27970.       "nouucp", MFminc (-6),
  27971.   
  27972. ! #define    WIDSW    23
  27973.       "width columns", 0,
  27974.   
  27975. ! #define    HELPSW    24
  27976.       "help", 4,
  27977.   
  27978. !     NULL, 0
  27979.   };
  27980.   
  27981.   /*   */
  27982. ***************
  27983. *** 124,135 ****
  27984.   
  27985.   static int    pop_action (), pop_pack ();
  27986.   static int    map_count();
  27987. ! #endif    POP
  27988.   
  27989.   /*   * /
  27990.   
  27991.   /* ARGSUSED */
  27992.   
  27993.   main (argc, argv)
  27994.   int    argc;
  27995.   char   *argv[];
  27996. --- 156,171 ----
  27997.   
  27998.   static int    pop_action (), pop_pack ();
  27999.   static int    map_count();
  28000. ! #endif    /* POP */
  28001.   
  28002.   /*   * /
  28003.   
  28004.   /* ARGSUSED */
  28005.   
  28006. + #ifdef MAILGROUP    /* For setting and returning to "mail" gid */
  28007. + static int return_gid;
  28008. + #endif    /* MAILGROUP */
  28009.   main (argc, argv)
  28010.   int    argc;
  28011.   char   *argv[];
  28012. ***************
  28013. *** 141,153 ****
  28014.           width = 0,
  28015.   #ifdef    MF
  28016.           uucp = 1,
  28017. ! #endif    MF
  28018.           locked = 0,
  28019.   #ifdef    POP
  28020.           nmsgs,
  28021.           nbytes,
  28022. !         p,
  28023. ! #endif    POP
  28024.           rpop = 1,
  28025.               i,
  28026.           hghnum,
  28027. --- 177,189 ----
  28028.           width = 0,
  28029.   #ifdef    MF
  28030.           uucp = 1,
  28031. ! #endif    /* MF */
  28032.           locked = 0,
  28033.   #ifdef    POP
  28034.           nmsgs,
  28035.           nbytes,
  28036. !         p = 0,
  28037. ! #endif    /* POP */
  28038.           rpop = 1,
  28039.               i,
  28040.           hghnum,
  28041. ***************
  28042. *** 160,169 ****
  28043.              *audfile = NULL,
  28044.              *from = NULL,
  28045.          *host = NULL,
  28046. -        *user = NULL,
  28047.   #ifdef    POP
  28048.          *pass = NULL,
  28049. ! #endif    POP
  28050.              *newmail,
  28051.               buf[100],
  28052.             **ap,
  28053. --- 196,204 ----
  28054.              *audfile = NULL,
  28055.              *from = NULL,
  28056.          *host = NULL,
  28057.   #ifdef    POP
  28058.          *pass = NULL,
  28059. ! #endif    /* POP */
  28060.              *newmail,
  28061.               buf[100],
  28062.             **ap,
  28063. ***************
  28064. *** 170,175 ****
  28065. --- 205,211 ----
  28066.             **argp,
  28067.              *nfs,
  28068.              *arguments[MAXARGS];
  28069. +     char *user = NULL;
  28070.       struct msgs *mp;
  28071.       struct stat st,
  28072.                   s1;
  28073. ***************
  28074. *** 176,191 ****
  28075.       FILE *in, *aud = NULL;
  28076.   #ifdef    MHE
  28077.       FILE *mhe = NULL;
  28078. ! #endif    MHE
  28079.   
  28080.       invo_name = r1bindex (argv[0], '/');
  28081.       mts_init (invo_name);
  28082.   #ifdef    POP
  28083. -     if (pophost && *pophost)
  28084. -     host = pophost;
  28085.       if ((cp = getenv ("MHPOPDEBUG")) && *cp)
  28086.       snoop++;
  28087. ! #endif    POP
  28088.       if ((cp = m_find (invo_name)) != NULL) {
  28089.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  28090.       ap = copyip (ap, arguments);
  28091. --- 212,234 ----
  28092.       FILE *in, *aud = NULL;
  28093.   #ifdef    MHE
  28094.       FILE *mhe = NULL;
  28095. ! #endif    /* MHE */
  28096. ! #ifdef HESIOD
  28097. !     struct hes_postoffice *po;
  28098. !     char *tmphost;
  28099. ! #endif
  28100.   
  28101. + #ifdef LOCALE
  28102. +     setlocale(LC_ALL, "");
  28103. + #endif
  28104.       invo_name = r1bindex (argv[0], '/');
  28105.       mts_init (invo_name);
  28106.   #ifdef    POP
  28107.       if ((cp = getenv ("MHPOPDEBUG")) && *cp)
  28108.       snoop++;
  28109. ! #endif
  28110.       if ((cp = m_find (invo_name)) != NULL) {
  28111.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  28112.       ap = copyip (ap, arguments);
  28113. ***************
  28114. *** 271,282 ****
  28115.           case UUCPSW: 
  28116.   #ifdef    MF
  28117.               uucp++;
  28118. ! #endif    MF
  28119.               continue;
  28120.           case NUUCPSW: 
  28121.   #ifdef    MF
  28122.               uucp = 0;
  28123. ! #endif    MF
  28124.               continue;
  28125.   
  28126.           case HOSTSW:
  28127. --- 314,325 ----
  28128.           case UUCPSW: 
  28129.   #ifdef    MF
  28130.               uucp++;
  28131. ! #endif    /* MF */
  28132.               continue;
  28133.           case NUUCPSW: 
  28134.   #ifdef    MF
  28135.               uucp = 0;
  28136. ! #endif    /* MF */
  28137.               continue;
  28138.   
  28139.           case HOSTSW:
  28140. ***************
  28141. *** 291,309 ****
  28142.   #ifndef    POP
  28143.               if (!(cp = *argp++) || *cp == '-')
  28144.               adios (NULLCP, "missing argument to %s", argp[-2]);
  28145. ! #else    POP
  28146.               if (!(file = *argp++) || *file == '-')
  28147.               adios (NULLCP, "missing argument to %s", argp[-2]);
  28148. ! #endif    POP
  28149.               continue;
  28150.           case NPACKSW:
  28151.   #ifdef    POP
  28152.               file = NULLCP;
  28153. ! #endif    POP
  28154.               continue;
  28155.           case RPOPSW:
  28156. !             rpop++;
  28157.               continue;
  28158.           case NRPOPSW:
  28159.               rpop = 0;
  28160.               continue;
  28161. --- 334,356 ----
  28162.   #ifndef    POP
  28163.               if (!(cp = *argp++) || *cp == '-')
  28164.               adios (NULLCP, "missing argument to %s", argp[-2]);
  28165. ! #else    /* POP */
  28166.               if (!(file = *argp++) || *file == '-')
  28167.               adios (NULLCP, "missing argument to %s", argp[-2]);
  28168. ! #endif    /* POP */
  28169.               continue;
  28170.           case NPACKSW:
  28171.   #ifdef    POP
  28172.               file = NULLCP;
  28173. ! #endif    /* POP */
  28174.               continue;
  28175. +         case APOPSW:
  28176. +             rpop = -1;
  28177. +             continue;
  28178.           case RPOPSW:
  28179. !             rpop = 1;
  28180.               continue;
  28181. +         case NAPOPSW:
  28182.           case NRPOPSW:
  28183.               rpop = 0;
  28184.               continue;
  28185. ***************
  28186. *** 320,336 ****
  28187.   
  28188.   /*   */
  28189.   
  28190.   #ifdef    POP
  28191.       if (host && !*host)
  28192.       host = NULL;
  28193. !     if (from || !host || !rpop)
  28194.       (void) setuid (getuid ());
  28195. ! #endif    POP
  28196.       if (from) {
  28197.       newmail = from;
  28198.   #ifdef    POP
  28199.       host = NULL;
  28200. ! #endif    POP
  28201.       if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
  28202.           adios (NULLCP, "no mail to incorporate");
  28203.       }
  28204. --- 367,408 ----
  28205.   
  28206.   /*   */
  28207.   
  28208. + #ifdef MAILGROUP
  28209. +     return_gid = getegid();    /* Save effective gid, assuming we'll use it */
  28210. +     setgid(getgid());        /* Turn off extraordinary privileges */
  28211. + #endif    /* MAILGROUP */
  28212.   #ifdef    POP
  28213. + #ifdef HESIOD
  28214. +     /*
  28215. +      * Scheme is:
  28216. +      *        use MAILHOST environment variable if present,
  28217. +      *  else try Hesiod.
  28218. +      *  If that fails, use the default (if any)
  28219. +      *  provided by mtstailor in mts_init()
  28220. +      */
  28221. +     if (pophost == NULL || pophost[0] == '\0')
  28222. +       {
  28223. +     if ((tmphost = getenv("MAILHOST")) != NULL)
  28224. +       pophost = tmphost;
  28225. +     else if ((po = hes_getmailhost(getusr())) != NULL &&
  28226. +          strcmp(po->po_type, "POP") == 0)
  28227. +       pophost = po->po_host;
  28228. +       }
  28229. + #endif /* HESIOD */
  28230. +     if (pophost && *pophost)
  28231. +     host = pophost;
  28232.       if (host && !*host)
  28233.       host = NULL;
  28234. !     if (from || !host || rpop <= 0)
  28235.       (void) setuid (getuid ());
  28236. ! #endif /* POP */
  28237.       if (from) {
  28238.       newmail = from;
  28239.   #ifdef    POP
  28240.       host = NULL;
  28241. ! #endif    /* POP */
  28242.       if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
  28243.           adios (NULLCP, "no mail to incorporate");
  28244.       }
  28245. ***************
  28246. *** 354,360 ****
  28247.           adios (NULLCP, "no mail to incorporate");
  28248.       }
  28249.       }
  28250. ! #endif    POP
  28251.       else {
  28252.       if (((newmail = getenv ("MAILDROP")) && *newmail)
  28253.           || ((newmail = m_find ("maildrop")) && *newmail))
  28254. --- 426,432 ----
  28255.           adios (NULLCP, "no mail to incorporate");
  28256.       }
  28257.       }
  28258. ! #endif    /* POP */
  28259.       else {
  28260.       if (((newmail = getenv ("MAILDROP")) && *newmail)
  28261.           || ((newmail = m_find ("maildrop")) && *newmail))
  28262. ***************
  28263. *** 363,369 ****
  28264.   #ifdef    MF
  28265.           if (uucp && umincproc && *umincproc)
  28266.           get_uucp_mail ();
  28267. ! #endif    MF
  28268.           newmail = concat (MAILDIR, "/", MAILFIL, NULLCP);
  28269.       }
  28270.       if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
  28271. --- 435,441 ----
  28272.   #ifdef    MF
  28273.           if (uucp && umincproc && *umincproc)
  28274.           get_uucp_mail ();
  28275. ! #endif    /* MF */
  28276.           newmail = concat (MAILDIR, "/", MAILFIL, NULLCP);
  28277.       }
  28278.       if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
  28279. ***************
  28280. *** 373,382 ****
  28281.   #ifdef    POP
  28282.       if (host && file)
  28283.       goto go_to_it;
  28284. ! #endif    POP
  28285.       if (!m_find ("path"))
  28286.       free (path ("./", TFOLDER));
  28287. !     if (!folder)
  28288.       folder = defalt;
  28289.       maildir = m_maildir (folder);
  28290.   
  28291. --- 445,454 ----
  28292.   #ifdef    POP
  28293.       if (host && file)
  28294.       goto go_to_it;
  28295. ! #endif    /* POP */
  28296.       if (!m_find ("path"))
  28297.       free (path ("./", TFOLDER));
  28298. !     if (!folder && !(folder = m_find (inbox)))
  28299.       folder = defalt;
  28300.       maildir = m_maildir (folder);
  28301.   
  28302. ***************
  28303. *** 401,407 ****
  28304.   #ifdef    POP
  28305.   go_to_it: ;
  28306.       if (host == NULL)
  28307. ! #endif    POP
  28308.       if (access (newmail, 02) == NOTOK) {
  28309.       trnflag = 0;
  28310.       if ((in = fopen (newmail, "r")) == NULL)
  28311. --- 473,479 ----
  28312.   #ifdef    POP
  28313.   go_to_it: ;
  28314.       if (host == NULL)
  28315. ! #endif    /* POP */
  28316.       if (access (newmail, 02) == NOTOK) {
  28317.       trnflag = 0;
  28318.       if ((in = fopen (newmail, "r")) == NULL)
  28319. ***************
  28320. *** 415,425 ****
  28321. --- 487,508 ----
  28322.           (void) signal (SIGQUIT, SIG_IGN);
  28323.           (void) signal (SIGTERM, SIG_IGN);
  28324.       }
  28325. + #ifdef MAILGROUP
  28326. +     setgid(return_gid);    /* Reset gid to lock mail file */
  28327. + #endif    /* MAILGROUP */
  28328.       if ((in = lkfopen (newmail, "r")) == NULL)
  28329.           adios (NULLCP, "unable to lock and fopen %s", newmail);
  28330. + #ifdef MAILGROUP
  28331. +     setgid(getgid());    /* Return us to normal privileges */
  28332. + #endif    /* MAILGROUP */
  28333.       (void) fstat (fileno(in), &s1);
  28334.       }
  28335.   
  28336. + #ifdef MAILGROUP
  28337. +     setgid(getgid());    /* Return us to normal privileges */
  28338. + #endif    /* MAILGROUP */
  28339.       if (audfile) {
  28340.       if ((i = stat (audfile, &st)) == NOTOK)
  28341.           advise (NULLCP, "Creating Receive-Audit: %s", audfile);
  28342. ***************
  28343. *** 431,442 ****
  28344.   #ifndef    POP
  28345.       fprintf (aud, from ? "<<inc>> %s  -ms %s\n" : "<<inc>> %s\n",
  28346.           dtimenow (), from);
  28347. ! #else    POP
  28348.       fprintf (aud, from ? "<<inc>> %s -ms %s\n"
  28349.               : host ? "<<inc>> %s -host %s -user %s%s\n"
  28350.               : "<<inc>> %s\n",
  28351. !         dtimenow (), from ? from : host, user, rpop ? " -rpop" : "");
  28352. ! #endif    POP
  28353.       }
  28354.   
  28355.   #ifdef    MHE
  28356. --- 514,526 ----
  28357.   #ifndef    POP
  28358.       fprintf (aud, from ? "<<inc>> %s  -ms %s\n" : "<<inc>> %s\n",
  28359.           dtimenow (), from);
  28360. ! #else    /* POP */
  28361.       fprintf (aud, from ? "<<inc>> %s -ms %s\n"
  28362.               : host ? "<<inc>> %s -host %s -user %s%s\n"
  28363.               : "<<inc>> %s\n",
  28364. !          dtimenow (), from ? from : host, user,
  28365. !          rpop < 0 ? " -apop" : rpop > 0 ? " -rpop" : "");
  28366. ! #endif    /* POP */
  28367.       }
  28368.   
  28369.   #ifdef    MHE
  28370. ***************
  28371. *** 450,456 ****
  28372.           (void) chmod (cp, m_gmprot ());
  28373.       free (cp);
  28374.       }
  28375. ! #endif    MHE
  28376.   
  28377.       nfs = new_fs (form, format, FORMAT);
  28378.   
  28379. --- 534,540 ----
  28380.           (void) chmod (cp, m_gmprot ());
  28381.       free (cp);
  28382.       }
  28383. ! #endif    /* MHE */
  28384.   
  28385.       nfs = new_fs (form, format, FORMAT);
  28386.   
  28387. ***************
  28388. *** 520,531 ****
  28389.           }
  28390.           switch (p = scan (pf, msgnum, 0, nfs, width,
  28391.               file ? 0 : msgnum == mp -> hghmsg + 1 && chgflag,
  28392.               0, stop - start, noisy)) {
  28393.           case SCNEOF: 
  28394.               printf ("%*d  empty\n", DMAXFOLDER, msgnum);
  28395.               break;
  28396.   
  28397. !         case SCNERR: 
  28398.           case SCNNUM: 
  28399.               break;
  28400.   
  28401. --- 604,622 ----
  28402.           }
  28403.           switch (p = scan (pf, msgnum, 0, nfs, width,
  28404.               file ? 0 : msgnum == mp -> hghmsg + 1 && chgflag,
  28405. +             1,    /* check UNSEEN? */
  28406.               0, stop - start, noisy)) {
  28407.           case SCNEOF: 
  28408.               printf ("%*d  empty\n", DMAXFOLDER, msgnum);
  28409.               break;
  28410.   
  28411. !         case SCNFAT:
  28412. !             trnflag = 0;
  28413. !             noisy++;
  28414. !             /* advise (cp, "unable to read"); already advised */
  28415. !             /* fall thru */
  28416. !         case SCNERR:
  28417.           case SCNNUM: 
  28418.               break;
  28419.   
  28420. ***************
  28421. *** 537,543 ****
  28422.   #ifdef    MHE
  28423.               if (mhe)
  28424.               fputs (scanl, mhe);
  28425. ! #endif    MHE
  28426.               if (noisy)
  28427.               (void) fflush (stdout);
  28428.               if (!file) {
  28429. --- 628,634 ----
  28430.   #ifdef    MHE
  28431.               if (mhe)
  28432.               fputs (scanl, mhe);
  28433. ! #endif    /* MHE */
  28434.               if (noisy)
  28435.               (void) fflush (stdout);
  28436.               if (!file) {
  28437. ***************
  28438. *** 551,557 ****
  28439.                   mp -> numsel++;
  28440.                   mp -> msgstats[msgnum] |= SELECTED;
  28441.               }
  28442. ! #endif    TMA
  28443.               mp -> msgstats[msgnum] |= UNSEEN;
  28444.               mp -> msgflags |= SEQMOD;
  28445.               }
  28446. --- 642,648 ----
  28447.                   mp -> numsel++;
  28448.                   mp -> msgstats[msgnum] |= SELECTED;
  28449.               }
  28450. ! #endif    /* TMA */
  28451.               mp -> msgstats[msgnum] |= UNSEEN;
  28452.               mp -> msgflags |= SEQMOD;
  28453.               }
  28454. ***************
  28455. *** 560,573 ****
  28456.           if (file) {
  28457.           (void) fseek (pf, stop, 0);
  28458.           (void) fwrite (mmdlm2, 1, strlen (mmdlm2), pf);
  28459. !         if (fflush (pf))
  28460.               adios (file, "write error on");
  28461.           (void) map_write (file, pd, 0, 0L, start, stop, pos, size,
  28462.                   noisy);
  28463.           }
  28464.           else {
  28465. !         if (ferror(pf) || fclose (pf))
  28466. !             adios (file, "write error on");
  28467.           free (cp);
  28468.           }
  28469.   
  28470. --- 651,673 ----
  28471.           if (file) {
  28472.           (void) fseek (pf, stop, 0);
  28473.           (void) fwrite (mmdlm2, 1, strlen (mmdlm2), pf);
  28474. !         if (fflush (pf) || ferror (pf)) {
  28475. !             int e = errno;
  28476. !             (void) pop_quit ();
  28477. !             errno = e;
  28478.               adios (file, "write error on");
  28479. +         }
  28480.           (void) map_write (file, pd, 0, 0L, start, stop, pos, size,
  28481.                   noisy);
  28482.           }
  28483.           else {
  28484. !         if (ferror(pf) || fclose (pf)) {
  28485. !             int e = errno;
  28486. !             (void) unlink (cp);
  28487. !             (void) pop_quit ();
  28488. !             errno = e;
  28489. !             adios (cp, "write error on");
  28490. !         }
  28491.           free (cp);
  28492.           }
  28493.   
  28494. ***************
  28495. *** 582,617 ****
  28496.       }
  28497.       }
  28498.       else {
  28499. ! #endif    POP
  28500.   
  28501.   /*   */
  28502.   
  28503.       m_unknown (in);        /* the MAGIC invocation... */
  28504.       hghnum = msgnum = mp -> hghmsg;
  28505. !     for (;;) {
  28506.       if (msgnum >= mp -> hghoff)
  28507. !         if ((mp = m_remsg (mp, 0, mp -> hghoff + MAXFOLDER)) == NULL)
  28508. !         adios (NULLCP, "unable to allocate folder storage");
  28509.   
  28510.       switch (i = scan (in, msgnum + 1, msgnum + 1, nfs, width,
  28511.               msgnum == hghnum && chgflag,
  28512.               0,
  28513.               0L,
  28514.               noisy)) {
  28515.           case SCNEOF: 
  28516.           break;
  28517.   
  28518. !         case SCNERR: 
  28519.           if (aud)
  28520.               fputs ("inc aborted!\n", aud);
  28521. !         adios (NULLCP, "aborted!");
  28522.   
  28523.           case SCNNUM: 
  28524. !         adios (NULLCP, "more than %d messages in folder %s, %s not zero'd",
  28525.               MAXFOLDER, folder, newmail);
  28526.   
  28527.           default: 
  28528. !         adios (NULLCP, "scan() botch (%d)", i);
  28529.   
  28530.           case SCNMSG:
  28531.           case SCNENC:
  28532. --- 682,726 ----
  28533.       }
  28534.       }
  28535.       else {
  28536. ! #endif    /* POP */
  28537.   
  28538.   /*   */
  28539.   
  28540.       m_unknown (in);        /* the MAGIC invocation... */
  28541.       hghnum = msgnum = mp -> hghmsg;
  28542. !     for (i = 0;;) {
  28543.       if (msgnum >= mp -> hghoff)
  28544. !         if ((mp = m_remsg (mp, 0, mp -> hghoff + MAXFOLDER)) == NULL) {
  28545. !         advise (NULLCP, "unable to allocate folder storage");
  28546. !         i = NOTOK;
  28547. !         break;
  28548. !         }
  28549.   
  28550.       switch (i = scan (in, msgnum + 1, msgnum + 1, nfs, width,
  28551.               msgnum == hghnum && chgflag,
  28552. +             1,    /* check UNSEEN? */
  28553.               0,
  28554.               0L,
  28555.               noisy)) {
  28556. +         case SCNFAT:
  28557.           case SCNEOF: 
  28558.           break;
  28559.   
  28560. !         case SCNERR:
  28561.           if (aud)
  28562.               fputs ("inc aborted!\n", aud);
  28563. !         advise (NULLCP, "aborted!");    /* doesn't clean up locks! */
  28564. !         break;
  28565.   
  28566.           case SCNNUM: 
  28567. !         advise (NULLCP,
  28568. !             "more than %d messages in folder %s, %s not zero'd",
  28569.               MAXFOLDER, folder, newmail);
  28570. +         break;
  28571.   
  28572.           default: 
  28573. !         advise (NULLCP, "scan() botch (%d)", i);
  28574. !         break;
  28575.   
  28576.           case SCNMSG:
  28577.           case SCNENC:
  28578. ***************
  28579. *** 620,626 ****
  28580.   #ifdef    MHE
  28581.           if (mhe)
  28582.               fputs (scanl, mhe);
  28583. ! #endif    MHE
  28584.           if (noisy)
  28585.               (void) fflush (stdout);
  28586.   
  28587. --- 729,735 ----
  28588.   #ifdef    MHE
  28589.           if (mhe)
  28590.               fputs (scanl, mhe);
  28591. ! #endif    /* MHE */
  28592.           if (noisy)
  28593.               (void) fflush (stdout);
  28594.   
  28595. ***************
  28596. *** 635,641 ****
  28597.               mp -> numsel++;
  28598.               mp -> msgstats[msgnum] |= SELECTED;
  28599.           }
  28600. ! #endif    TMA
  28601.           mp -> msgstats[msgnum] |= UNSEEN;
  28602.           mp -> msgflags |= SEQMOD;
  28603.           continue;
  28604. --- 744,750 ----
  28605.               mp -> numsel++;
  28606.               mp -> msgstats[msgnum] |= SELECTED;
  28607.           }
  28608. ! #endif    /* TMA */
  28609.           mp -> msgstats[msgnum] |= UNSEEN;
  28610.           mp -> msgflags |= SEQMOD;
  28611.           continue;
  28612. ***************
  28613. *** 644,669 ****
  28614.       }
  28615.   #ifdef    POP
  28616.       }
  28617. ! #endif    POP
  28618.   
  28619.       if (aud)
  28620.       (void) fclose (aud);
  28621.   #ifdef    MHE
  28622.       if (mhe)
  28623.       (void) fclose (mhe);
  28624. ! #endif    MHE
  28625.       if (noisy)
  28626.       (void) fflush (stdout);
  28627.   #ifdef    POP
  28628.       if (host && file)
  28629.       done (0);
  28630. ! #endif    POP
  28631.   
  28632.   /*   */
  28633.   
  28634.   #ifdef    POP
  28635.       if (host == NULL)
  28636. ! #endif    POP
  28637.       if (trnflag) {
  28638.       if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
  28639.           advise (NULLCP, "new messages have arrived!\007");
  28640. --- 753,798 ----
  28641.       }
  28642.   #ifdef    POP
  28643.       }
  28644. ! #endif    /* POP */
  28645. ! #ifndef    POP
  28646. !     if (i < 0) {        /* error } */
  28647. ! #else
  28648. !     if (p < 0) {        /* error */
  28649. ! #endif
  28650. !     if (locked)
  28651. ! #ifdef MAILGROUP
  28652. !     {
  28653. !       setgid(return_gid);    /* Be sure we can unlock mail file */
  28654. ! #endif    /* MAILGROUP */
  28655.   
  28656. +         (void) lkfclose (in, newmail);
  28657. + #ifdef MAILGROUP
  28658. +         setgid(getgid());    /* And then return us to normal privileges */
  28659. +      }
  28660. + #endif    /* MAILGROUP */
  28661. +     else
  28662. +         (void) fclose (in);
  28663. +     adios (NULLCP, "failed");
  28664. +     }
  28665.       if (aud)
  28666.       (void) fclose (aud);
  28667.   #ifdef    MHE
  28668.       if (mhe)
  28669.       (void) fclose (mhe);
  28670. ! #endif    /* MHE */
  28671.       if (noisy)
  28672.       (void) fflush (stdout);
  28673.   #ifdef    POP
  28674.       if (host && file)
  28675.       done (0);
  28676. ! #endif    /* POP */
  28677.   
  28678.   /*   */
  28679.   
  28680.   #ifdef    POP
  28681.       if (host == NULL)
  28682. ! #endif    /* POP */
  28683.       if (trnflag) {
  28684.       if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
  28685.           advise (NULLCP, "new messages have arrived!\007");
  28686. ***************
  28687. *** 694,702 ****
  28688.   
  28689.   #ifdef    POP
  28690.       if (host == NULL)
  28691. ! #endif    POP
  28692.       if (locked)
  28693. !     (void) lkfclose (in, newmail);
  28694.       else
  28695.       (void) fclose (in);
  28696.   
  28697. --- 823,840 ----
  28698.   
  28699.   #ifdef    POP
  28700.       if (host == NULL)
  28701. ! #endif    /* POP */
  28702.       if (locked)
  28703. ! #ifdef MAILGROUP
  28704. !     {
  28705. !       setgid(return_gid);    /* Be sure we can unlock mail file */
  28706. ! #endif    /* MAILGROUP */
  28707. !         (void) lkfclose (in, newmail);
  28708. ! #ifdef MAILGROUP
  28709. !         setgid(getgid());    /* And then return us to normal privileges */
  28710. !      }
  28711. ! #endif    /* MAILGROUP */
  28712.       else
  28713.       (void) fclose (in);
  28714.   
  28715. ***************
  28716. *** 721,726 ****
  28717. --- 859,865 ----
  28718.           }
  28719.           switch (scan (in, msgnum, 0, nfs, width,
  28720.               msgnum == mp -> curmsg,
  28721. +             1,    /* check UNSEEN? */
  28722.               0,
  28723.               fstat (fileno (in), &st) != NOTOK ? (long) st.st_size
  28724.                   : 0L,
  28725. ***************
  28726. *** 740,746 ****
  28727.       if (noisy)
  28728.           (void) fflush (stdout);
  28729.       }
  28730. ! #endif    TMA
  28731.   
  28732.       done (0);
  28733.   }
  28734. --- 879,885 ----
  28735.       if (noisy)
  28736.           (void) fflush (stdout);
  28737.       }
  28738. ! #endif    /* TMA */
  28739.   
  28740.       done (0);
  28741.   }
  28742. ***************
  28743. *** 756,762 ****
  28744.   
  28745.       exit (status);
  28746.   }
  28747. ! #endif    POP
  28748.   /*   */
  28749.   
  28750.   #ifdef MF
  28751. --- 895,901 ----
  28752.   
  28753.       exit (status);
  28754.   }
  28755. ! #endif    /* POP */
  28756.   /*   */
  28757.   
  28758.   #ifdef MF
  28759. ***************
  28760. *** 785,791 ****
  28761.           break;
  28762.       }
  28763.   }
  28764. ! #endif    MF
  28765.   
  28766.   /*   */
  28767.   
  28768. --- 924,930 ----
  28769.           break;
  28770.       }
  28771.   }
  28772. ! #endif    /* MF */
  28773.   
  28774.   /*   */
  28775.   
  28776. ***************
  28777. *** 830,833 ****
  28778.       (void) close (md);
  28779.       return (d.d_id);
  28780.   }
  28781. ! #endif    POP
  28782. --- 969,972 ----
  28783.       (void) close (md);
  28784.       return (d.d_id);
  28785.   }
  28786. ! #endif    /* POP */
  28787. *** ../mh-6.7.2/uip/install-mh.c    Thu Apr  5 16:03:43 1990
  28788. --- uip/install-mh.c    Mon Dec 14 16:21:11 1992
  28789. ***************
  28790. *** 1,7 ****
  28791.   /* install-mh.c - initialize the MH environment */
  28792.   #ifndef    lint
  28793. ! static char ident[] = "@(#)$Id: install-mh.c,v 1.3 90/04/05 15:01:19 sources Exp $";
  28794. ! #endif    lint
  28795.   
  28796.   #include "../h/mh.h"
  28797.   #include <pwd.h>
  28798. --- 1,7 ----
  28799.   /* install-mh.c - initialize the MH environment */
  28800.   #ifndef    lint
  28801. ! static char ident[] = "@(#)$Id: install-mh.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  28802. ! #endif    /* lint */
  28803.   
  28804.   #include "../h/mh.h"
  28805.   #include <pwd.h>
  28806. ***************
  28807. *** 8,13 ****
  28808. --- 8,16 ----
  28809.   #include <stdio.h>
  28810.   #include <sys/types.h>
  28811.   #include <sys/stat.h>
  28812. + #ifdef LOCALE
  28813. + #include    <locale.h>
  28814. + #endif
  28815.   
  28816.   /*   */
  28817.   
  28818. ***************
  28819. *** 23,29 ****
  28820. --- 26,36 ----
  28821.   
  28822.   static char   *geta ();
  28823.   
  28824. + #ifndef __STDC__
  28825. + #ifdef    SYS5
  28826.   struct passwd  *getpwuid ();
  28827. + #endif
  28828. + #endif /* !__STDC__ */
  28829.   
  28830.   /*   */
  28831.   
  28832. ***************
  28833. *** 43,48 ****
  28834. --- 50,58 ----
  28835.       FILE   *in,
  28836.          *out;
  28837.   
  28838. + #ifdef LOCALE
  28839. +     setlocale(LC_ALL, "");
  28840. + #endif
  28841.       invo_name = r1bindex (argv[0], '/');
  28842.   
  28843.   #ifdef    COMPAT
  28844. ***************
  28845. *** 69,75 ****
  28846.   
  28847.       done (0);
  28848.       }
  28849. ! #endif    COMPAT
  28850.   
  28851.       autof = (argc == 2 && strcmp (argv[1], "-auto") == 0);
  28852.       if (mypath == NULL) {    /* straight from m_getdefs... */
  28853. --- 79,85 ----
  28854.   
  28855.       done (0);
  28856.       }
  28857. ! #endif    /* COMPAT */
  28858.   
  28859.       autof = (argc == 2 && strcmp (argv[1], "-auto") == 0);
  28860.       if (mypath == NULL) {    /* straight from m_getdefs... */
  28861. ***************
  28862. *** 78,89 ****
  28863.       else
  28864.           if ((pw = getpwuid (getuid ())) == NULL
  28865.               || pw -> pw_dir == NULL
  28866. !             || *pw -> pw_dir == NULL)
  28867.           adios (NULLCP, "no HOME envariable");
  28868.           else
  28869.           mypath = getcpy (pw -> pw_dir);
  28870.       if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
  28871. !         *cp = NULL;
  28872.       }
  28873.       defpath = concat (mypath, "/", mh_profile, NULLCP);
  28874.   
  28875. --- 88,99 ----
  28876.       else
  28877.           if ((pw = getpwuid (getuid ())) == NULL
  28878.               || pw -> pw_dir == NULL
  28879. !             || *pw -> pw_dir == 0)
  28880.           adios (NULLCP, "no HOME envariable");
  28881.           else
  28882.           mypath = getcpy (pw -> pw_dir);
  28883.       if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
  28884. !         *cp = 0;
  28885.       }
  28886.       defpath = concat (mypath, "/", mh_profile, NULLCP);
  28887.   
  28888. ***************
  28889. *** 189,194 ****
  28890.       if (fgets (line, sizeof line, stdin) == NULL)
  28891.       done (1);
  28892.       if (cp = index (line, '\n'))
  28893. !     *cp = NULL;
  28894.       return line;
  28895.   }
  28896. --- 199,204 ----
  28897.       if (fgets (line, sizeof line, stdin) == NULL)
  28898.       done (1);
  28899.       if (cp = index (line, '\n'))
  28900. !     *cp = 0;
  28901.       return line;
  28902.   }
  28903. *** ../mh-6.7.2/uip/mark.c    Thu Oct 29 15:02:26 1987
  28904. --- uip/mark.c    Mon Dec 14 16:21:12 1992
  28905. ***************
  28906. *** 1,7 ****
  28907. --- 1,13 ----
  28908.   /* mark.c - mark messages */
  28909. + #ifndef    lint
  28910. + static char ident[] = "@(#)$Id: mark.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  28911. + #endif    /* lint */
  28912.   
  28913.   #include "../h/mh.h"
  28914.   #include <stdio.h>
  28915. + #ifdef LOCALE
  28916. + #include    <locale.h>
  28917. + #endif
  28918.   
  28919.   /*   */
  28920.   
  28921. ***************
  28922. *** 32,38 ****
  28923.   #define    DEBUGSW    9
  28924.       "debug", -5,
  28925.   
  28926. !     NULL, NULL
  28927.   };
  28928.   
  28929.   /*   */
  28930. --- 38,44 ----
  28931.   #define    DEBUGSW    9
  28932.       "debug", -5,
  28933.   
  28934. !     NULL, 0
  28935.   };
  28936.   
  28937.   /*   */
  28938. ***************
  28939. *** 64,69 ****
  28940. --- 70,78 ----
  28941.              *msgs[MAXARGS];
  28942.       struct msgs *mp;
  28943.   
  28944. + #ifdef LOCALE
  28945. +     setlocale(LC_ALL, "");
  28946. + #endif
  28947.       invo_name = r1bindex (argv[0], '/');
  28948.       if ((cp = m_find (invo_name)) != NULL) {
  28949.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  28950. ***************
  28951. *** 190,199 ****
  28952.   #ifndef    MTR
  28953.       printf ("lowoff=%d hghoff=%d\n",
  28954.           mp -> lowoff, mp -> hghoff);
  28955. ! #else    MTR
  28956.       printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
  28957.           mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
  28958. ! #endif    MTR
  28959.       }
  28960.   
  28961.       if (seqp == 0 && (addsw || deletesw))
  28962. --- 199,208 ----
  28963.   #ifndef    MTR
  28964.       printf ("lowoff=%d hghoff=%d\n",
  28965.           mp -> lowoff, mp -> hghoff);
  28966. ! #else    /* MTR */
  28967.       printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
  28968.           mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
  28969. ! #endif    /* MTR */
  28970.       }
  28971.   
  28972.       if (seqp == 0 && (addsw || deletesw))
  28973. *** /dev/null    Tue Dec 15 08:01:10 1992
  28974. --- uip/md5.c    Mon Oct 26 08:48:09 1992
  28975. ***************
  28976. *** 0 ****
  28977. --- 1,338 ----
  28978. + #ifndef    lint
  28979. + static char md5ident[]="@(#)$Id: md5.c,v 1.4 1992/10/26 16:48:02 jromine Exp $";
  28980. + #endif
  28981. + /* taken from RFC-1321/Appendix A.3 */
  28982. + /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
  28983. +  */
  28984. + /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  28985. + rights reserved.
  28986. + License to copy and use this software is granted provided that it
  28987. + is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  28988. + Algorithm" in all material mentioning or referencing this software
  28989. + or this function.
  28990. + License is also granted to make and use derivative works provided
  28991. + that such works are identified as "derived from the RSA Data
  28992. + Security, Inc. MD5 Message-Digest Algorithm" in all material
  28993. + mentioning or referencing the derived work.
  28994. + RSA Data Security, Inc. makes no representations concerning either
  28995. + the merchantability of this software or the suitability of this
  28996. + software for any particular purpose. It is provided "as is"
  28997. + without express or implied warranty of any kind.
  28998. + These notices must be retained in any copies of any part of this
  28999. + documentation and/or software.
  29000. +  */
  29001. + /* #include "global.h" */
  29002. + #include "../h/md5.h"
  29003. + /* Constants for MD5Transform routine.
  29004. +  */
  29005. + #define S11 7
  29006. + #define S12 12
  29007. + #define S13 17
  29008. + #define S14 22
  29009. + #define S21 5
  29010. + #define S22 9
  29011. + #define S23 14
  29012. + #define S24 20
  29013. + #define S31 4
  29014. + #define S32 11
  29015. + #define S33 16
  29016. + #define S34 23
  29017. + #define S41 6
  29018. + #define S42 10
  29019. + #define S43 15
  29020. + #define S44 21
  29021. + static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
  29022. + static void Encode PROTO_LIST
  29023. +   ((unsigned char *, UINT4 *, unsigned int));
  29024. + static void Decode PROTO_LIST
  29025. +   ((UINT4 *, unsigned char *, unsigned int));
  29026. + static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
  29027. + static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
  29028. + static unsigned char PADDING[64] = {
  29029. +   0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  29030. +   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  29031. +   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  29032. + };
  29033. + /* F, G, H and I are basic MD5 functions.
  29034. +  */
  29035. + #define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
  29036. + #define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
  29037. + #define H(x, y, z) ((x) ^ (y) ^ (z))
  29038. + #define I(x, y, z) ((y) ^ ((x) | (~z)))
  29039. + /* ROTATE_LEFT rotates x left n bits.
  29040. +  */
  29041. + #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
  29042. + /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
  29043. + Rotation is separate from addition to prevent recomputation.
  29044. +  */
  29045. + #define FF(a, b, c, d, x, s, ac) { \
  29046. +  (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
  29047. +  (a) = ROTATE_LEFT ((a), (s)); \
  29048. +  (a) += (b); \
  29049. +   }
  29050. + #define GG(a, b, c, d, x, s, ac) { \
  29051. +  (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
  29052. +  (a) = ROTATE_LEFT ((a), (s)); \
  29053. +  (a) += (b); \
  29054. +   }
  29055. + #define HH(a, b, c, d, x, s, ac) { \
  29056. +  (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
  29057. +  (a) = ROTATE_LEFT ((a), (s)); \
  29058. +  (a) += (b); \
  29059. +   }
  29060. + #define II(a, b, c, d, x, s, ac) { \
  29061. +  (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
  29062. +  (a) = ROTATE_LEFT ((a), (s)); \
  29063. +  (a) += (b); \
  29064. +   }
  29065. + /* MD5 initialization. Begins an MD5 operation, writing a new context.
  29066. +  */
  29067. + void MD5Init (context)
  29068. + MD5_CTX *context;                                        /* context */
  29069. + {
  29070. +   context->count[0] = context->count[1] = 0;
  29071. +   /* Load magic initialization constants.
  29072. + */
  29073. +   context->state[0] = 0x67452301;
  29074. +   context->state[1] = 0xefcdab89;
  29075. +   context->state[2] = 0x98badcfe;
  29076. +   context->state[3] = 0x10325476;
  29077. + }
  29078. + /* MD5 block update operation. Continues an MD5 message-digest
  29079. +   operation, processing another message block, and updating the
  29080. +   context.
  29081. +  */
  29082. + void MD5Update (context, input, inputLen)
  29083. + MD5_CTX *context;                                        /* context */
  29084. + unsigned char *input;                                /* input block */
  29085. + unsigned int inputLen;                     /* length of input block */
  29086. + {
  29087. +   unsigned int i, index, partLen;
  29088. +   /* Compute number of bytes mod 64 */
  29089. +   index = (unsigned int)((context->count[0] >> 3) & 0x3F);
  29090. +   /* Update number of bits */
  29091. +   if ((context->count[0] += ((UINT4)inputLen << 3))
  29092. +    < ((UINT4)inputLen << 3))
  29093. +  context->count[1]++;
  29094. +   context->count[1] += ((UINT4)inputLen >> 29);
  29095. +   partLen = 64 - index;
  29096. +   /* Transform as many times as possible.
  29097. + */
  29098. +   if (inputLen >= partLen) {
  29099. +  MD5_memcpy
  29100. +    ((POINTER)&context->buffer[index], (POINTER)input, partLen);
  29101. +  MD5Transform (context->state, context->buffer);
  29102. +  for (i = partLen; i + 63 < inputLen; i += 64)
  29103. +    MD5Transform (context->state, &input[i]);
  29104. +  index = 0;
  29105. +   }
  29106. +   else
  29107. +  i = 0;
  29108. +   /* Buffer remaining input */
  29109. +   MD5_memcpy
  29110. +  ((POINTER)&context->buffer[index], (POINTER)&input[i],
  29111. +   inputLen-i);
  29112. + }
  29113. + /* MD5 finalization. Ends an MD5 message-digest operation, writing the
  29114. +   the message digest and zeroizing the context.
  29115. +  */
  29116. + void MD5Final (digest, context)
  29117. + unsigned char digest[16];                         /* message digest */
  29118. + MD5_CTX *context;                                       /* context */
  29119. + {
  29120. +   unsigned char bits[8];
  29121. +   unsigned int index, padLen;
  29122. +   /* Save number of bits */
  29123. +   Encode (bits, context->count, 8);
  29124. +   /* Pad out to 56 mod 64.
  29125. + */
  29126. +   index = (unsigned int)((context->count[0] >> 3) & 0x3f);
  29127. +   padLen = (index < 56) ? (56 - index) : (120 - index);
  29128. +   MD5Update (context, PADDING, padLen);
  29129. +   /* Append length (before padding) */
  29130. +   MD5Update (context, bits, 8);
  29131. +   /* Store state in digest */
  29132. +   Encode (digest, context->state, 16);
  29133. +   /* Zeroize sensitive information.
  29134. + */
  29135. +   MD5_memset ((POINTER)context, 0, sizeof (*context));
  29136. + }
  29137. + /* MD5 basic transformation. Transforms state based on block.
  29138. +  */
  29139. + static void MD5Transform (state, block)
  29140. + UINT4 state[4];
  29141. + unsigned char block[64];
  29142. + {
  29143. +   UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
  29144. +   Decode (x, block, 64);
  29145. +   /* Round 1 */
  29146. +   FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
  29147. +   FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
  29148. +   FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
  29149. +   FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
  29150. +   FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
  29151. +   FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
  29152. +   FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
  29153. +   FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
  29154. +   FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
  29155. +   FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
  29156. +   FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
  29157. +   FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
  29158. +   FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
  29159. +   FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
  29160. +   FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
  29161. +   FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
  29162. +  /* Round 2 */
  29163. +   GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
  29164. +   GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
  29165. +   GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
  29166. +   GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
  29167. +   GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
  29168. +   GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
  29169. +   GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
  29170. +   GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
  29171. +   GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
  29172. +   GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
  29173. +   GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
  29174. +   GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
  29175. +   GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
  29176. +   GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
  29177. +   GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
  29178. +   GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
  29179. +   /* Round 3 */
  29180. +   HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
  29181. +   HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
  29182. +   HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
  29183. +   HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
  29184. +   HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
  29185. +   HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
  29186. +   HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
  29187. +   HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
  29188. +   HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
  29189. +   HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
  29190. +   HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
  29191. +   HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
  29192. +   HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
  29193. +   HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
  29194. +   HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
  29195. +   HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
  29196. +   /* Round 4 */
  29197. +   II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
  29198. +   II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
  29199. +   II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
  29200. +   II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
  29201. +   II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
  29202. +   II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
  29203. +   II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
  29204. +   II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
  29205. +   II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
  29206. +   II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
  29207. +   II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
  29208. +   II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
  29209. +   II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
  29210. +   II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
  29211. +   II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
  29212. +   II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
  29213. +   state[0] += a;
  29214. +   state[1] += b;
  29215. +   state[2] += c;
  29216. +   state[3] += d;
  29217. +   /* Zeroize sensitive information.
  29218. + */
  29219. +   MD5_memset ((POINTER)x, 0, sizeof (x));
  29220. + }
  29221. + /* Encodes input (UINT4) into output (unsigned char). Assumes len is
  29222. +   a multiple of 4.
  29223. +  */
  29224. + static void Encode (output, input, len)
  29225. + unsigned char *output;
  29226. + UINT4 *input;
  29227. + unsigned int len;
  29228. + {
  29229. +   unsigned int i, j;
  29230. +   for (i = 0, j = 0; j < len; i++, j += 4) {
  29231. +  output[j] = (unsigned char)(input[i] & 0xff);
  29232. +  output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
  29233. +  output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
  29234. +  output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
  29235. +   }
  29236. + }
  29237. + /* Decodes input (unsigned char) into output (UINT4). Assumes len is
  29238. +   a multiple of 4.
  29239. +  */
  29240. + static void Decode (output, input, len)
  29241. + UINT4 *output;
  29242. + unsigned char *input;
  29243. + unsigned int len;
  29244. + {
  29245. +   unsigned int i, j;
  29246. +   for (i = 0, j = 0; j < len; i++, j += 4)
  29247. +  output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
  29248. +    (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
  29249. + }
  29250. + /* Note: Replace "for loop" with standard memcpy if possible.
  29251. +  */
  29252. + static void MD5_memcpy (output, input, len)
  29253. + POINTER output;
  29254. + POINTER input;
  29255. + unsigned int len;
  29256. + {
  29257. +   unsigned int i;
  29258. +   for (i = 0; i < len; i++)
  29259. +  output[i] = input[i];
  29260. + }
  29261. + /* Note: Replace "for loop" with standard memset if possible.
  29262. +  */
  29263. + static void MD5_memset (output, value, len)
  29264. + POINTER output;
  29265. + int value;
  29266. + unsigned int len;
  29267. + {
  29268. +   unsigned int i;
  29269. +   for (i = 0; i < len; i++)
  29270. +  ((char *)output)[i] = (char)value;
  29271. + }
  29272. *** ../mh-6.7.2/uip/mhl.c    Thu Oct 29 15:02:26 1987
  29273. --- uip/mhl.c    Mon Dec 14 16:21:13 1992
  29274. ***************
  29275. *** 1,10 ****
  29276.   /* mhl.c - the MH message listing program */
  29277.   
  29278.   main (argc, argv)
  29279.   int     argc;
  29280.   char  **argv;
  29281.   {
  29282.       done (mhl (argc, argv));
  29283.   }
  29284.   
  29285. --- 1,18 ----
  29286.   /* mhl.c - the MH message listing program */
  29287. + #ifndef    lint
  29288. + static char ident[] = "@(#)$Id: mhl.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
  29289. + #endif    /* lint */
  29290. + #ifdef LOCALE
  29291. + #include    <locale.h>
  29292. + #endif
  29293.   
  29294.   main (argc, argv)
  29295.   int     argc;
  29296.   char  **argv;
  29297.   {
  29298. + #ifdef LOCALE
  29299. +     setlocale(LC_ALL, "");
  29300. + #endif
  29301.       done (mhl (argc, argv));
  29302.   }
  29303.   
  29304. *** ../mh-6.7.2/uip/mhlsbr.c    Fri Jan 25 14:49:56 1991
  29305. --- uip/mhlsbr.c    Mon Dec 14 16:21:14 1992
  29306. ***************
  29307. *** 1,12 ****
  29308.   /* mhlsbr.c - implement the "nifty" message lister */
  29309.   #ifndef    lint
  29310. ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.16 91/01/25 14:49:46 mh Exp $";
  29311. ! #endif    lint
  29312.   
  29313.   #include "../h/mh.h"
  29314.   #include "../h/addrsbr.h"
  29315.   #include "../h/formatsbr.h"
  29316.   #include "../zotnet/tws.h"
  29317.   #include <ctype.h>
  29318.   #include <setjmp.h>
  29319.   #include <signal.h>
  29320. --- 1,19 ----
  29321.   /* mhlsbr.c - implement the "nifty" message lister */
  29322.   #ifndef    lint
  29323. ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.28 1992/12/15 00:20:22 jromine Exp $";
  29324. ! #endif    /* lint */
  29325.   
  29326.   #include "../h/mh.h"
  29327.   #include "../h/addrsbr.h"
  29328.   #include "../h/formatsbr.h"
  29329.   #include "../zotnet/tws.h"
  29330. + #ifdef SVR4
  29331. + #undef    NULLVP        /* XXX  */
  29332. + #endif
  29333. + #if    defined(SYS5) && defined(AUX)
  29334. + #define u_short ushort
  29335. + #define u_long  ulong
  29336. + #endif
  29337.   #include <ctype.h>
  29338.   #include <setjmp.h>
  29339.   #include <signal.h>
  29340. ***************
  29341. *** 36,42 ****
  29342.   
  29343.   #ifdef    SYS5
  29344.   #define    u_short    ushort
  29345. ! #endif    SYS5
  29346.   
  29347.   #define ONECOMP        0
  29348.   #define TWOCOMP        1
  29349. --- 43,49 ----
  29350.   
  29351.   #ifdef    SYS5
  29352.   #define    u_short    ushort
  29353. ! #endif    /* SYS5 */
  29354.   
  29355.   #define ONECOMP        0
  29356.   #define TWOCOMP        1
  29357. ***************
  29358. *** 101,108 ****
  29359.       "volume number", -6,
  29360.   #define ISSUESW 20
  29361.       "issue number", -5,
  29362.   
  29363. !     NULL, NULL
  29364.   };
  29365.   
  29366.   /*   */
  29367. --- 108,117 ----
  29368.       "volume number", -6,
  29369.   #define ISSUESW 20
  29370.       "issue number", -5,
  29371. + #define NBODYSW 21
  29372. +     "nobody", -6,
  29373.   
  29374. !     NULL, 0
  29375.   };
  29376.   
  29377.   /*   */
  29378. ***************
  29379. *** 139,145 ****
  29380.   #define    FACEFMT        0x004000/* contains face            */
  29381.   #define    FACEDFLT    0x008000/* default for face            */
  29382.   #define    SPLIT        0x010000/* split headers (don't concatenate)    */
  29383. ! #define    LBITS    "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT"
  29384.   #define    GFLAGS    (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS \
  29385.               | SPLIT)
  29386.   
  29387. --- 148,155 ----
  29388.   #define    FACEFMT        0x004000/* contains face            */
  29389.   #define    FACEDFLT    0x008000/* default for face            */
  29390.   #define    SPLIT        0x010000/* split headers (don't concatenate)    */
  29391. ! #define    NONEWLINE    0x020000/* don't write trailing newline        */
  29392. ! #define    LBITS    "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT\022NONEWLINE"
  29393.   #define    GFLAGS    (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS \
  29394.               | SPLIT)
  29395.   
  29396. ***************
  29397. *** 152,162 ****
  29398.   static struct mcomp *fmttl = NULL;
  29399.   
  29400.   static struct mcomp global = {
  29401. !     NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL
  29402.   };
  29403.   static struct mcomp  holder =
  29404.   {
  29405. !     NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL
  29406.   };
  29407.   
  29408.   
  29409. --- 162,172 ----
  29410.   static struct mcomp *fmttl = NULL;
  29411.   
  29412.   static struct mcomp global = {
  29413. !     NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, 0
  29414.   };
  29415.   static struct mcomp  holder =
  29416.   {
  29417. !     NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, 0
  29418.   };
  29419.   
  29420.   
  29421. ***************
  29422. *** 206,211 ****
  29423. --- 216,223 ----
  29424.                               "bell", BELL, 0,
  29425.                               "nobell", 0, BELL,
  29426.                               "datefield", DATEFMT, ADDRFMT,
  29427. +                 "newline", 0, NONEWLINE,
  29428. +                 "nonewline", NONEWLINE, 0,
  29429.   
  29430.                               NULL
  29431.   };
  29432. ***************
  29433. *** 215,220 ****
  29434. --- 227,233 ----
  29435.   static int  bellflg = 0;
  29436.   static int  clearflg = 0;
  29437.   static int  dashflg = 1;
  29438. + static int  dobody = 1;
  29439.   static int  forwflg = 0;
  29440.   static int  forwall = 0;
  29441.   
  29442. ***************
  29443. *** 256,262 ****
  29444.   
  29445.   
  29446.   static char delim3[] =        /* from forw.c */
  29447. !     "\n------------------------------------------------------------\n\n";
  29448.   static char delim4[] = "\n------------------------------\n\n";
  29449.   
  29450.   
  29451. --- 269,275 ----
  29452.   
  29453.   
  29454.   static char delim3[] =        /* from forw.c */
  29455. !     "\n----------------------------------------------------------------------\n\n";
  29456.   static char delim4[] = "\n------------------------------\n\n";
  29457.   
  29458.   
  29459. ***************
  29460. *** 264,270 ****
  29461.   
  29462.   
  29463.   static void    mhladios (), mhldone ();
  29464. ! static int    intrser (), pipeser (), quitser ();
  29465.   static char   *mcomp_add (), *oneline (), *parse ();
  29466.   static struct mcomp *add_queue ();
  29467.   
  29468. --- 277,283 ----
  29469.   
  29470.   
  29471.   static void    mhladios (), mhldone ();
  29472. ! static TYPESIG    intrser (), pipeser (), quitser ();
  29473.   static char   *mcomp_add (), *oneline (), *parse ();
  29474.   static struct mcomp *add_queue ();
  29475.   
  29476. ***************
  29477. *** 415,420 ****
  29478. --- 428,437 ----
  29479.           case NDASHSW: 
  29480.               dashflg = 0;
  29481.               continue;
  29482. +         case NBODYSW: 
  29483. +             dobody = 0;
  29484. +             continue;
  29485.           }
  29486.       files[vecp++] = cp;
  29487.       }
  29488. ***************
  29489. *** 461,467 ****
  29490.           for (cp = buf + i; i > 1; i--)
  29491.           *cp++ = '*';
  29492.           *cp++ = '\n';
  29493. !         *cp = NULL;
  29494.           printf ("%s", buf);
  29495.       }
  29496.       else
  29497. --- 478,484 ----
  29498.           for (cp = buf + i; i > 1; i--)
  29499.           *cp++ = '*';
  29500.           *cp++ = '\n';
  29501. !         *cp = 0;
  29502.           printf ("%s", buf);
  29503.       }
  29504.       else
  29505. ***************
  29506. *** 532,538 ****
  29507.           continue;
  29508.   
  29509.       if (cp = index (bp, '\n'))
  29510. !         *cp = NULL;
  29511.   
  29512.       if (*bp == ':') {
  29513.           c1 = add_queue (&fmthd, &fmttl, NULLCP, bp + 1, CLEARTEXT);
  29514. --- 549,555 ----
  29515.           continue;
  29516.   
  29517.       if (cp = index (bp, '\n'))
  29518. !         *cp = 0;
  29519.   
  29520.       if (*bp == ':') {
  29521.           c1 = add_queue (&fmthd, &fmttl, NULLCP, bp + 1, CLEARTEXT);
  29522. ***************
  29523. *** 715,721 ****
  29524.           if (!*++parptr)
  29525.               parptr--;
  29526.       c = *parptr;
  29527. !     *parptr = NULL;
  29528.       *s = getcpy (cp);
  29529.       if ((*parptr = c) == '"')
  29530.       parptr++;
  29531. --- 732,738 ----
  29532.           if (!*++parptr)
  29533.               parptr--;
  29534.       c = *parptr;
  29535. !     *parptr = 0;
  29536.       *s = getcpy (cp);
  29537.       if ((*parptr = c) == '"')
  29538.       parptr++;
  29539. ***************
  29540. *** 739,745 ****
  29541.           *cp++ = c;
  29542.       else
  29543.           break;
  29544. !     *cp = NULL;
  29545.   
  29546.       return result;
  29547.   }
  29548. --- 756,762 ----
  29549.           *cp++ = c;
  29550.       else
  29551.           break;
  29552. !     *cp = 0;
  29553.   
  29554.       return result;
  29555.   }
  29556. ***************
  29557. *** 843,849 ****
  29558.               printf ("Press <return> to list \"%s\"...", mname);
  29559.               }
  29560.               (void) fflush (stdout);
  29561. !             buf[0] = NULL;
  29562.               (void) read (fileno (stdout), buf, sizeof buf);
  29563.           }
  29564.           if (index (buf, '\n')) {
  29565. --- 860,866 ----
  29566.               printf ("Press <return> to list \"%s\"...", mname);
  29567.               }
  29568.               (void) fflush (stdout);
  29569. !             buf[0] = 0;
  29570.               (void) read (fileno (stdout), buf, sizeof buf);
  29571.           }
  29572.           if (index (buf, '\n')) {
  29573. ***************
  29574. *** 924,930 ****
  29575.                   putcomp (c1, c2, TWOCOMP);
  29576.               continue;
  29577.               }
  29578. !             if (uleq (c1 -> c_name, "body")) {
  29579.               if ((holder.c_text = malloc (sizeof buf)) == NULL)
  29580.                   adios (NULLCP, "unable to allocate buffer memory");
  29581.               (void) strcpy (holder.c_text, buf);
  29582. --- 941,947 ----
  29583.                   putcomp (c1, c2, TWOCOMP);
  29584.               continue;
  29585.               }
  29586. !             if (dobody && uleq (c1 -> c_name, "body")) {
  29587.               if ((holder.c_text = malloc (sizeof buf)) == NULL)
  29588.                   adios (NULLCP, "unable to allocate buffer memory");
  29589.               (void) strcpy (holder.c_text, buf);
  29590. ***************
  29591. *** 979,985 ****
  29592.       if (uleq (ap -> p_name, name))
  29593.           return (ap -> p_flags);
  29594.   
  29595. !     return NULL;
  29596.   }
  29597.   
  29598.   
  29599. --- 996,1002 ----
  29600.       if (uleq (ap -> p_name, name))
  29601.           return (ap -> p_flags);
  29602.   
  29603. !     return 0;
  29604.   }
  29605.   
  29606.   
  29607. ***************
  29608. *** 994,1000 ****
  29609.       return add (s1, s2);
  29610.   
  29611.       if (s2 && *(dp = s2 + strlen (s2) - 1) == '\n')
  29612. !     *dp = NULL;
  29613.   
  29614.       return add (s1, add (",\n", s2));
  29615.   }
  29616. --- 1011,1017 ----
  29617.       return add (s1, s2);
  29618.   
  29619.       if (s2 && *(dp = s2 + strlen (s2) - 1) == '\n')
  29620. !     *dp = 0;
  29621.   
  29622.       return add (s1, add (",\n", s2));
  29623.   }
  29624. ***************
  29625. *** 1012,1018 ****
  29626.   register struct mcomp *c1,
  29627.                 *c2;
  29628.   {
  29629. !     int     dat[4];
  29630.       register char  *ap,
  29631.                      *cp;
  29632.       char    buffer[BUFSIZ],
  29633. --- 1029,1035 ----
  29634.   register struct mcomp *c1,
  29635.                 *c2;
  29636.   {
  29637. !     int     dat[5];
  29638.       register char  *ap,
  29639.                      *cp;
  29640.       char    buffer[BUFSIZ],
  29641. ***************
  29642. *** 1025,1031 ****
  29643.   
  29644.       ap = c2 -> c_text;
  29645.       c2 -> c_text = NULL;
  29646. !     dat[0] = dat[1] = dat[2] = 0;
  29647.       dat[3] = sizeof buffer - 1;
  29648.       (void) fmt_compile (c1 -> c_nfs, &c1 -> c_fmt);
  29649.   
  29650. --- 1042,1048 ----
  29651.   
  29652.       ap = c2 -> c_text;
  29653.       c2 -> c_text = NULL;
  29654. !     dat[0] = dat[1] = dat[2] = dat[4] = 0;
  29655.       dat[3] = sizeof buffer - 1;
  29656.       (void) fmt_compile (c1 -> c_nfs, &c1 -> c_fmt);
  29657.   
  29658. ***************
  29659. *** 1033,1038 ****
  29660. --- 1050,1058 ----
  29661.       FINDCOMP (cptr, "text");
  29662.       if (cptr)
  29663.           cptr -> c_text = ap;
  29664. +     if (cp = rindex(ap, '\n'))    /* drop ending newline */
  29665. +         if (!cp[1])
  29666. +         *cp = 0;
  29667.   
  29668.       (void) fmtscan (c1 -> c_fmt, buffer, sizeof buffer - 1, dat);
  29669.       /* Don't need to append a newline, dctime() already did */
  29670. ***************
  29671. *** 1080,1086 ****
  29672.           if (c2 -> c_text)
  29673.           c2 -> c_text = add (",\n", c2 -> c_text);
  29674.           if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  29675. !         *cp = NULL;
  29676.           c2 -> c_text = add (buffer, c2 -> c_text);
  29677.       }
  29678.   
  29679. --- 1100,1106 ----
  29680.           if (c2 -> c_text)
  29681.           c2 -> c_text = add (",\n", c2 -> c_text);
  29682.           if (*(cp = buffer + strlen (buffer) - 1) == '\n')
  29683. !         *cp = 0;
  29684.           c2 -> c_text = add (buffer, c2 -> c_text);
  29685.       }
  29686.   
  29687. ***************
  29688. *** 1266,1272 ****
  29689.               : strlen (c1->c_text ? c1->c_text : c1->c_name) + 2;
  29690.       count += c1 -> c_offset;
  29691.   
  29692. !     putstr (oneline (c2 -> c_text, c1 -> c_flags));
  29693.       if (term == '\n')
  29694.       putstr ("\n");
  29695.       while (cp = oneline (c2 -> c_text, c1 -> c_flags)) {
  29696. --- 1286,1293 ----
  29697.               : strlen (c1->c_text ? c1->c_text : c1->c_name) + 2;
  29698.       count += c1 -> c_offset;
  29699.   
  29700. !     if (cp = oneline (c2 -> c_text, c1 -> c_flags))
  29701. !        putstr(cp);
  29702.       if (term == '\n')
  29703.       putstr ("\n");
  29704.       while (cp = oneline (c2 -> c_text, c1 -> c_flags)) {
  29705. ***************
  29706. *** 1293,1299 ****
  29707.   
  29708.       if (onelp == NULL)
  29709.       onelp = stuff;
  29710. !     if (*onelp == NULL)
  29711.       return (onelp = NULL);
  29712.   
  29713.       ret = onelp;
  29714. --- 1314,1320 ----
  29715.   
  29716.       if (onelp == NULL)
  29717.       onelp = stuff;
  29718. !     if (*onelp == 0)
  29719.       return (onelp = NULL);
  29720.   
  29721.       ret = onelp;
  29722. ***************
  29723. *** 1303,1309 ****
  29724.           if (isspace (*onelp)) {
  29725.           if (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT))) {
  29726.               term = '\n';
  29727. !             *onelp++ = NULL;
  29728.               break;
  29729.           }
  29730.           else
  29731. --- 1324,1330 ----
  29732.           if (isspace (*onelp)) {
  29733.           if (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT))) {
  29734.               term = '\n';
  29735. !             *onelp++ = 0;
  29736.               break;
  29737.           }
  29738.           else
  29739. ***************
  29740. *** 1317,1323 ****
  29741.           spc = 0;
  29742.           }
  29743.   
  29744. !     *cp = NULL;
  29745.       }
  29746.       else {
  29747.       while (*onelp && *onelp != '\n')
  29748. --- 1338,1344 ----
  29749.           spc = 0;
  29750.           }
  29751.   
  29752. !     *cp = 0;
  29753.       }
  29754.       else {
  29755.       while (*onelp && *onelp != '\n')
  29756. ***************
  29757. *** 1324,1335 ****
  29758.           onelp++;
  29759.       if (*onelp == '\n') {
  29760.           term = '\n';
  29761. !         *onelp++ = NULL;
  29762.       }
  29763.       if (flags & LEFTADJUST)
  29764.           while (*ret == ' ' || *ret == '\t')
  29765.           ret++;
  29766.       }
  29767.   
  29768.       return ret;
  29769.   }
  29770. --- 1345,1358 ----
  29771.           onelp++;
  29772.       if (*onelp == '\n') {
  29773.           term = '\n';
  29774. !         *onelp++ = 0;
  29775.       }
  29776.       if (flags & LEFTADJUST)
  29777.           while (*ret == ' ' || *ret == '\t')
  29778.           ret++;
  29779.       }
  29780. +     if (*onelp == 0 && term == '\n' && (flags & NONEWLINE))
  29781. +     term = 0;
  29782.   
  29783.       return ret;
  29784.   }
  29785. ***************
  29786. *** 1375,1381 ****
  29787.           if (global.c_flags & BELL)
  29788.           (void) putchar ('\007');
  29789.           (void) fflush (stdout);
  29790. !         buf[0] = NULL;
  29791.           (void) read (fileno (stdout), buf, sizeof buf);
  29792.           if (index (buf, '\n')) {
  29793.           if (global.c_flags & CLEARSCR)
  29794. --- 1398,1404 ----
  29795.           if (global.c_flags & BELL)
  29796.           (void) putchar ('\007');
  29797.           (void) fflush (stdout);
  29798. !         buf[0] = 0;
  29799.           (void) read (fileno (stdout), buf, sizeof buf);
  29800.           if (index (buf, '\n')) {
  29801.           if (global.c_flags & CLEARSCR)
  29802. ***************
  29803. *** 1425,1436 ****
  29804.   
  29805.   /* ARGSUSED */
  29806.   
  29807. ! static    int intrser (i)
  29808.   int     i;
  29809.   {
  29810.   #ifndef    BSD42
  29811.       (void) signal (SIGINT, intrser);
  29812. ! #endif    BSD42
  29813.   
  29814.       discard (stdout);
  29815.       (void) putchar ('\n');
  29816. --- 1448,1459 ----
  29817.   
  29818.   /* ARGSUSED */
  29819.   
  29820. ! static    TYPESIG intrser (i)
  29821.   int     i;
  29822.   {
  29823.   #ifndef    BSD42
  29824.       (void) signal (SIGINT, intrser);
  29825. ! #endif    /* BSD42 */
  29826.   
  29827.       discard (stdout);
  29828.       (void) putchar ('\n');
  29829. ***************
  29830. *** 1441,1452 ****
  29831.   
  29832.   /* ARGSUSED */
  29833.   
  29834. ! static    int pipeser (i)
  29835.   int     i;
  29836.   {
  29837.   #ifndef    BSD42
  29838.       (void) signal (SIGPIPE, pipeser);
  29839. ! #endif    BSD42
  29840.   
  29841.       done (NOTOK);
  29842.   }
  29843. --- 1464,1475 ----
  29844.   
  29845.   /* ARGSUSED */
  29846.   
  29847. ! static    TYPESIG pipeser (i)
  29848.   int     i;
  29849.   {
  29850.   #ifndef    BSD42
  29851.       (void) signal (SIGPIPE, pipeser);
  29852. ! #endif    /* BSD42 */
  29853.   
  29854.       done (NOTOK);
  29855.   }
  29856. ***************
  29857. *** 1454,1465 ****
  29858.   
  29859.   /* ARGSUSED */
  29860.   
  29861. ! static    int quitser (i)
  29862.   int     i;
  29863.   {
  29864.   #ifndef    BSD42
  29865.       (void) signal (SIGQUIT, quitser);
  29866. ! #endif    BSD42
  29867.   
  29868.       (void) putchar ('\n');
  29869.       (void) fflush (stdout);
  29870. --- 1477,1488 ----
  29871.   
  29872.   /* ARGSUSED */
  29873.   
  29874. ! static    TYPESIG quitser (i)
  29875.   int     i;
  29876.   {
  29877.   #ifndef    BSD42
  29878.       (void) signal (SIGQUIT, quitser);
  29879. ! #endif    /* BSD42 */
  29880.   
  29881.       (void) putchar ('\n');
  29882.       (void) fflush (stdout);
  29883. ***************
  29884. *** 1566,1572 ****
  29885.       return (result != NOTOK ? OK : NOTOK);
  29886.   }
  29887.   
  29888. ! #else    not BSD42 and not SOCKETS
  29889.   
  29890.   static int  doface (c1)
  29891.   register struct mcomp *c1;
  29892. --- 1589,1595 ----
  29893.       return (result != NOTOK ? OK : NOTOK);
  29894.   }
  29895.   
  29896. ! #else    /* not BSD42 and not SOCKETS */
  29897.   
  29898.   static int  doface (c1)
  29899.   register struct mcomp *c1;
  29900. ***************
  29901. *** 1675,1681 ****
  29902.   
  29903.       return result;
  29904.   }
  29905. ! #endif    not BSD42 and not SOCKETS
  29906.   
  29907.   /*   */
  29908.   
  29909. --- 1698,1704 ----
  29910.   
  29911.       return result;
  29912.   }
  29913. ! #endif    /* not BSD42 and not SOCKETS */
  29914.   
  29915.   /*   */
  29916.   
  29917. *** ../mh-6.7.2/uip/mhmail.c    Thu Apr  5 16:03:43 1990
  29918. --- uip/mhmail.c    Mon Dec 14 16:21:15 1992
  29919. ***************
  29920. *** 1,11 ****
  29921.   /* mhmail.c - simple mail program */
  29922.   #ifndef    lint
  29923. ! static char ident[] = "@(#)$Id: mhmail.c,v 1.3 90/04/05 15:01:25 sources Exp $";
  29924. ! #endif    lint
  29925.   
  29926.   #include "../h/mh.h"
  29927.   #include <stdio.h>
  29928.   #include <signal.h>
  29929.   
  29930.   /*   */
  29931.   
  29932. --- 1,14 ----
  29933.   /* mhmail.c - simple mail program */
  29934.   #ifndef    lint
  29935. ! static char ident[] = "@(#)$Id: mhmail.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  29936. ! #endif    /* lint */
  29937.   
  29938.   #include "../h/mh.h"
  29939.   #include <stdio.h>
  29940.   #include <signal.h>
  29941. + #ifdef LOCALE
  29942. + #include    <locale.h>
  29943. + #endif
  29944.   
  29945.   /*   */
  29946.   
  29947. ***************
  29948. *** 20,36 ****
  29949.       "from addr", 0,
  29950.   
  29951.   #define    SUBJSW    3
  29952. !     "subject", 0,
  29953.   
  29954.   #define    HELPSW    4
  29955.       "help", 4,
  29956.   
  29957. !     NULL, NULL
  29958.   };
  29959.   
  29960.   /*   */
  29961.   
  29962. ! static int    intrser ();
  29963.   
  29964.   
  29965.   static char tmpfil[BUFSIZ];
  29966. --- 23,42 ----
  29967.       "from addr", 0,
  29968.   
  29969.   #define    SUBJSW    3
  29970. !     "subject text", 0,
  29971.   
  29972.   #define    HELPSW    4
  29973.       "help", 4,
  29974.   
  29975. ! #define    RESNDSW    5
  29976. !     "resent", -6,
  29977. !     NULL, 0
  29978.   };
  29979.   
  29980.   /*   */
  29981.   
  29982. ! static TYPESIG    intrser ();
  29983.   
  29984.   
  29985.   static char tmpfil[BUFSIZ];
  29986. ***************
  29987. *** 47,52 ****
  29988. --- 53,59 ----
  29989.           status,
  29990.               i,
  29991.               iscc = 0,
  29992. +         resent = 0,
  29993.               somebody;
  29994.       char   *cp,
  29995.              *tolist = NULL,
  29996. ***************
  29997. *** 58,63 ****
  29998. --- 65,73 ----
  29999.               buf[100];
  30000.       FILE * out;
  30001.   
  30002. + #ifdef LOCALE
  30003. +     setlocale(LC_ALL, "");
  30004. + #endif
  30005.       invo_name = r1bindex (argv[0], '/');
  30006.       m_foil (NULLCP);
  30007.   
  30008. ***************
  30009. *** 102,107 ****
  30010. --- 112,121 ----
  30011.               if (!(subject = *argp++) || *subject == '-')
  30012.               adios (NULLCP, "missing argument to %s", argp[-2]);
  30013.               continue;
  30014. +         case RESNDSW: 
  30015. +             resent++;
  30016. +             continue;
  30017.           }
  30018.       if (iscc)
  30019.           cclist = cclist ? add (cp, add (", ", cclist)) : getcpy (cp);
  30020. ***************
  30021. *** 120,133 ****
  30022.   
  30023.       setsig (SIGINT, intrser);
  30024.   
  30025. !     fprintf (out, "To: %s\n", tolist);
  30026.       if (cclist)
  30027. !     fprintf (out, "cc: %s\n", cclist);
  30028.       if (subject)
  30029. !     fprintf (out, "Subject: %s\n", subject);
  30030.       if (from)
  30031. !     fprintf (out, "From: %s\n", from);
  30032. !     (void) fputs ("\n", out);
  30033.   
  30034.       if (body) {
  30035.       fprintf (out, "%s", body);
  30036. --- 134,148 ----
  30037.   
  30038.       setsig (SIGINT, intrser);
  30039.   
  30040. !     fprintf (out, "%sTo: %s\n", resent ? "Resent-" : "", tolist);
  30041.       if (cclist)
  30042. !     fprintf (out, "%scc: %s\n", resent ? "Resent-" : "", cclist);
  30043.       if (subject)
  30044. !     fprintf (out, "%sSubject: %s\n", resent ? "Resent-" : "", subject);
  30045.       if (from)
  30046. !     fprintf (out, "%sFrom: %s\n", resent ? "Resent-" : "", from);
  30047. !     if (!resent)
  30048. !     (void) fputs ("\n", out);
  30049.   
  30050.       if (body) {
  30051.       fprintf (out, "%s", body);
  30052. ***************
  30053. *** 156,162 ****
  30054.           admonish (NULLCP, "unable to fork");
  30055.   
  30056.       case OK: 
  30057. !         execlp (postproc, r1bindex (postproc, '/'), tmpfil, NULLCP);
  30058.           fprintf (stderr, "unable to exec ");
  30059.           perror (postproc);
  30060.           _exit (-1);
  30061. --- 171,178 ----
  30062.           admonish (NULLCP, "unable to fork");
  30063.   
  30064.       case OK: 
  30065. !         execlp (postproc, r1bindex (postproc, '/'), tmpfil,
  30066. !             resent ? "-dist" : NULLCP, NULLCP);
  30067.           fprintf (stderr, "unable to exec ");
  30068.           perror (postproc);
  30069.           _exit (-1);
  30070. ***************
  30071. *** 179,191 ****
  30072.   
  30073.   /* ARGSUSED */
  30074.   
  30075. ! static int  intrser (i)
  30076.   int     i;
  30077.   {
  30078.   #ifndef    BSD42
  30079.       if (i)
  30080.       (void) signal (i, SIG_IGN);
  30081. ! #endif    BSD42
  30082.   
  30083.       (void) unlink (tmpfil);
  30084.       done (i != 0 ? 1 : 0);
  30085. --- 195,207 ----
  30086.   
  30087.   /* ARGSUSED */
  30088.   
  30089. ! static TYPESIG  intrser (i)
  30090.   int     i;
  30091.   {
  30092.   #ifndef    BSD42
  30093.       if (i)
  30094.       (void) signal (i, SIG_IGN);
  30095. ! #endif    /* BSD42 */
  30096.   
  30097.       (void) unlink (tmpfil);
  30098.       done (i != 0 ? 1 : 0);
  30099. *** /dev/null    Tue Dec 15 08:01:10 1992
  30100. --- uip/mhn.c    Mon Dec 14 16:21:19 1992
  30101. ***************
  30102. *** 0 ****
  30103. --- 1,6054 ----
  30104. + /* mhn.c - multi-media MH */
  30105. + #ifndef    lint
  30106. + static char ident[] = "@(#)$Id: mhn.c,v 2.21 1992/12/15 00:20:22 jromine Exp $";
  30107. + #endif    /* lint */
  30108. + #include "../h/mh.h"
  30109. + #include <ctype.h>
  30110. + #include <errno.h>
  30111. + #include <setjmp.h>
  30112. + #include <signal.h>
  30113. + #include <stdio.h>
  30114. + #include <sys/types.h>
  30115. + #include <sys/stat.h>
  30116. + #ifdef    BSD42
  30117. + #include <sys/wait.h>
  30118. + #endif
  30119. + #ifdef LOCALE
  30120. + #include    <locale.h>
  30121. + #endif
  30122. + /*   */
  30123. + static struct swit switches[] = {
  30124. + #define    AUTOSW      0
  30125. +     "auto", 0,
  30126. + #define    NAUTOSW      1
  30127. +     "noauto", 0,
  30128. + #define    DEBUGSW      2
  30129. +     "debug", -5,
  30130. +     
  30131. + #define    EBCDICSW  3
  30132. +     "ebcdicsafe", 0,
  30133. + #define    NEBCDICSW 4
  30134. +     "noebcdicsafe", 0,
  30135. + #define    FORMSW      5
  30136. +     "form formfile", 4,
  30137. + #define    HEADSW      6
  30138. +     "headers", 0,
  30139. + #define    NHEADSW      7
  30140. +     "noheaders", 0,
  30141. + #define    LISTSW      8
  30142. +     "list", 0,
  30143. + #define    NLISTSW      9
  30144. +     "nolist", 0,
  30145. + #define    PARTSW     10
  30146. +     "part number", 0,
  30147. + #define    SIZESW     11
  30148. +     "realsize", 0,
  30149. + #define    NSIZESW     12
  30150. +     "norealsize", 0,
  30151. + #define    RFC934SW 13
  30152. +     "rfc934mode", 0,
  30153. + #define    NRFC934SW 14
  30154. +     "norfc934mode", 0,
  30155. + #define    SERIALSW 15
  30156. +     "serialonly", 0,
  30157. + #define    NSERIALSW 16
  30158. +     "noserialonly", 0,
  30159. + #define    SHOWSW     17
  30160. +     "show", 0,
  30161. + #define    NSHOWSW     18
  30162. +     "noshow", 0,
  30163. + #define    STORESW     19
  30164. +     "store", 0,
  30165. + #define    NSTORESW 20
  30166. +     "nostore", 0,
  30167. + #define    TYPESW     21
  30168. +     "type content", 0,
  30169. + #define    VERBSW     22
  30170. +     "verbose", 0,
  30171. + #define    NVERBSW     23
  30172. +     "noverbose", 0,
  30173. +     
  30174. + #define    HELPSW     24
  30175. +     "help", 4,
  30176. + #define    PROGSW   25
  30177. +     "moreproc program", -4,
  30178. + #define    NPROGSW     26
  30179. +     "nomoreproc", -3,
  30180. + #define    LENSW     27
  30181. +     "length lines", -4,
  30182. + #define    WIDSW     28
  30183. +     "width columns", -4,
  30184. + #define    FILESW     29        /* interface from show */
  30185. +     "file file", -4,
  30186. + #define    VIAMSW     30
  30187. +     "viamail mailpath", -7,
  30188. + #define    VIASSW     31
  30189. +     "viasubj subject", -7,
  30190. + #define    VIAPSW     32
  30191. +     "viaparm arguments", -7,
  30192. + #define    VIADSW     33
  30193. +     "viadesc text", -7,
  30194. + #define    VIACSW     34
  30195. +     "viacmnt text", -7,
  30196. + #define    VIAZSW     35
  30197. +     "viadelay seconds", -8,
  30198. + #define    VIAFSW     36
  30199. +     "viafrom mailpath", -7,
  30200. +     NULL, 0
  30201. + };
  30202. + /*   */
  30203. + #define    NPARTS    50
  30204. + #define    NTYPES    20
  30205. + static    int    autosw = 0;
  30206. +     int    debugsw = 0;
  30207. + static    int    ebcdicsw = 0;
  30208. + static    char   *formsw = NULLCP;
  30209. + static    int    headsw = 1;
  30210. + static    int    listsw = 0;
  30211. + static    int    nomore = 0;
  30212. + static    int    npart = 0;
  30213. + static    char   *parts[NPARTS + 1];
  30214. + static    char   *progsw = NULLCP;
  30215. + static    int    rfc934sw = 1;
  30216. + static    int    serialsw = 0;
  30217. + static    int    showsw = 0;
  30218. + static    int    sizesw = 1;
  30219. + static    int    storesw = 0;
  30220. + static    int    ntype = 0;
  30221. + static    char   *types[NTYPES + 1];
  30222. +     int    verbosw = 0;
  30223. + static    int    endian = 0;
  30224. + static  char   *mm_charset = NULL;
  30225. + static    int    xpid = 0;
  30226. + static    int    userrs = 0;
  30227. + static    char   *cache;
  30228. + static    int    cwdlen;
  30229. + static    char   *cwd;
  30230. + static    char   *dir;
  30231. + static    char   *errs = NULL;
  30232. + static    char   *tmp;
  30233. + extern    int    errno;
  30234. + extern    int    sys_nerr;
  30235. + extern    char   *sys_errlist[];
  30236. + off_t    lseek ();
  30237. + time_t    time ();
  30238. + /*   */
  30239. + #define    LSTFMT1        "%4s %-5s %-24s %5s %-36s\n"
  30240. + #define    LSTFMT2a    "%4d "
  30241. + #define    LSTFMT2b    "%-5s %-24.24s "
  30242. + #define    LSTFMT2c1    "%5lu"
  30243. + #define    LSTFMT2c2    "%4lu%c"
  30244. + #define    LSTFMT2c3    "huge "
  30245. + #define    LSTFMT2c4    "     "
  30246. + #define    LSTFMT2d1    " %-36.36s"
  30247. + #define    LSTFMT2d2    "\t     %-65.65s\n"
  30248. + static void  build_comp ();
  30249. + typedef struct CTinfo {
  30250. +     char   *ci_type;
  30251. +     char   *ci_subtype;
  30252. + #define    NPARMS    10
  30253. +     char   *ci_attrs[NPARMS + 2];
  30254. +     char   *ci_values[NPARMS];
  30255. +     char   *ci_comment;
  30256. +     char   *ci_magic;
  30257. + }    CTInfo, *CI;
  30258. + #define    NULLCI    ((CI) 0)
  30259. + static int get_ctinfo ();
  30260. + static int get_comment ();
  30261. + typedef struct Content {
  30262. +     char   *c_partno;        /* within multipart content */
  30263. +     char   *c_vrsn;        /* Body-Version: */
  30264. +     char   *c_ctline;        /* Content-Type: */
  30265. +     CTInfo  c_ctinfo;
  30266. +     int        c_type;        /* internal form */
  30267. + #define    CT_UNKNOWN    0x00
  30268. + #define    CT_APPLICATION    0x01
  30269. + #define    CT_AUDIO    0x02
  30270. + #define    CT_IMAGE    0x03
  30271. + #define    CT_MESSAGE    0x04
  30272. + #define    CT_MULTIPART    0x05
  30273. + #define    CT_TEXT        0x06
  30274. + #define    CT_VIDEO    0x07
  30275. + #define    CT_EXTENSION    0x08
  30276. +     int        c_subtype;        /* filled-in by c_ctinitfnx */
  30277. +     caddr_t c_ctparams;        /*   .. */
  30278. +     caddr_t c_ctextern;        /*   .. */
  30279. +     char   *c_showproc;        /* default, if not in profile */
  30280. +     char   *c_termproc;        /* for charset madness... */
  30281. +     char   *c_storeproc;    /* default, if not in profile */
  30282. +     int      (*c_ctinitfnx) ();    /* parse content */
  30283. +     int      (*c_ctlistfnx) ();    /* list content */
  30284. +     int      (*c_ctshowfnx) ();    /* show content */
  30285. +     int      (*c_ctstorefnx) ();    /* store content */
  30286. +     int      (*c_ctfreefnx) ();    /* free content-specific structures */
  30287. +     char   *c_celine;        /* Content-Transfer-Encoding: */
  30288. +     int        c_encoding;        /* internal form */
  30289. + #define    CE_UNKNOWN    0x00
  30290. + #define    CE_BASE64    0x01
  30291. + #define    CE_QUOTED    0x02
  30292. + #define    CE_8BIT        0x03
  30293. + #define    CE_7BIT        0x04
  30294. + #define    CE_BINARY    0x05
  30295. + #define    CE_EXTENSION    0x06
  30296. + #define    CE_EXTERNAL    0x07    /* for external-body */
  30297. +     caddr_t c_ceparams;        /* filled-in by encoding initfnx */
  30298. +     int      (*c_ceopenfnx) ();    /* get a stream to decoded contents */
  30299. +     int      (*c_ceclosefnx) ();    /* release stream */
  30300. +     int      (*c_celistfnx) ();    /* list decoding info */
  30301. +     unsigned long
  30302. +       (*c_cesizefnx) ();    /* size of decoded contents */
  30303. +     int      (*c_cefreefnx) ();    /* free encoding-specific structures */
  30304. +     char   *c_id;        /* Content-ID: */
  30305. +     char   *c_descr;        /* Content-Description: */
  30306. +     FILE   *c_fp;        /* read contents (stream) */
  30307. +     char   *c_file;        /* read contents (file) */
  30308. +     int        c_unlink;        /* remove file when done? */
  30309. +     int        c_umask;        /* associated umask */
  30310. +     long    c_begin;        /* where content starts in file */
  30311. +     long    c_end;        /*   ..         ends           */
  30312. +     int        c_pid;        /* process doing display */
  30313. +     char   *c_storage;        /* write contents (file) */
  30314. +     int        c_rfc934;        /* rfc934 compatibility */
  30315. + }    Content, *CT;
  30316. + #define    NULLCT    ((CT) 0)
  30317. + static CT get_content ();
  30318. + static int list_content (), show_content (), store_content ();
  30319. + static int user_content(), compose_content(), output_content();
  30320. + static void free_content (), flush_errors ();
  30321. + #if    defined(__STDC__) && defined(VSPRINTF)
  30322. + static void content_error (char *, register CT, char *, ...);
  30323. + #else
  30324. + static void content_error ();
  30325. + #endif
  30326. + static int   init_encoding(), type_ok(), copy_some_headers(), set_endian();
  30327. + static int   write7Bit(), writeQuoted(), writeBase64(), writeBase64aux();
  30328. + static int   via_mail(), via_post(), pidcheck();
  30329. + static    CT    *cts = NULL;
  30330. + #define    quitser    pipeser
  30331. + static    TYPESIG    pipeser ();
  30332. + static    char   *fgetstr ();
  30333. + /*   */
  30334. + /* ARGSUSED */
  30335. + main (argc, argv)
  30336. + int     argc;
  30337. + char  **argv;
  30338. + {
  30339. +     int     f6 = 0,
  30340. +         msgp = 0,
  30341. +             msgnum;
  30342. +     char   *cp,
  30343. +        *f1 = NULL,
  30344. +        *f2 = NULL,
  30345. +        *f3 = NULL,
  30346. +        *f4 = NULL,
  30347. +        *f5 = NULL,
  30348. +        *f7 = NULL,
  30349. +        *file = NULL,
  30350. +            *folder = NULL,
  30351. +            *maildir,
  30352. +             buf[100],
  30353. +           **ap,
  30354. +           **argp,
  30355. +            *arguments[MAXARGS],
  30356. +            *msgs[MAXARGS];
  30357. +     struct msgs *mp;
  30358. +     register CT     ct,
  30359. +         *ctp;
  30360. +     FILE    *fp;
  30361. + #ifdef LOCALE
  30362. +     setlocale(LC_ALL, "");
  30363. + #endif
  30364. +     invo_name = r1bindex (argv[0], '/');
  30365. +     if (argv[1] && uprf (argv[1], "-via"))
  30366. +     m_foil (NULLCP);
  30367. +     if ((cp = m_find (invo_name)) != NULL) {
  30368. +     ap = brkstring (cp = getcpy (cp), " ", "\n");
  30369. +     ap = copyip (ap, arguments);
  30370. +     }
  30371. +     else
  30372. +     ap = arguments;
  30373. +     (void) copyip (argv + 1, ap);
  30374. +     argp = arguments;
  30375. + /*   */
  30376. +     while (cp = *argp++) {
  30377. +     if (*cp == '-')
  30378. +         switch (smatch (++cp, switches)) {
  30379. +         case AMBIGSW: 
  30380. +             ambigsw (cp, switches);
  30381. +             done (1);
  30382. +         case UNKWNSW: 
  30383. +             adios (NULLCP, "-%s unknown", cp);
  30384. +         case HELPSW: 
  30385. +             (void) sprintf (buf, "%s [+folder] [msgs] [switches]",
  30386. +                 invo_name);
  30387. +             help (buf, switches);
  30388. +             done (1);
  30389. +         case AUTOSW:
  30390. +             autosw++;
  30391. +             continue;
  30392. +         case NAUTOSW:
  30393. +             autosw = 0;
  30394. +             continue;
  30395. +         case DEBUGSW:
  30396. +             debugsw++;
  30397. +             continue;
  30398. +     
  30399. +         case EBCDICSW:
  30400. +             ebcdicsw++;
  30401. +             continue;
  30402. +         case NEBCDICSW:
  30403. +             ebcdicsw = 0;
  30404. +             continue;
  30405. +         case FORMSW:
  30406. +             if (!(cp = *argp++) || *cp == '-')
  30407. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30408. +             if (formsw)
  30409. +             free (formsw);
  30410. +             formsw = getcpy (libpath (cp));
  30411. +             continue;
  30412. +         case HEADSW:
  30413. +             headsw++;
  30414. +             continue;
  30415. +         case NHEADSW:
  30416. +             headsw = 0;
  30417. +             continue;
  30418. +         case LISTSW:
  30419. +             listsw++;
  30420. +             continue;
  30421. +         case NLISTSW:
  30422. +             listsw = 0;
  30423. +             continue;
  30424. +         case PARTSW:
  30425. +             if (!(cp = *argp++) || *cp == '-')
  30426. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30427. +             if (npart >= NPARTS)
  30428. +             adios (NULLCP,
  30429. +                    "too many parts (starting with %s), %d max",
  30430. +                    cp, NPARTS);
  30431. +             parts[npart++] = cp;
  30432. +             continue;
  30433. +         case RFC934SW:
  30434. +             rfc934sw++;
  30435. +             continue;
  30436. +         case NRFC934SW:
  30437. +             rfc934sw = 0;
  30438. +             continue;
  30439. +         case SERIALSW:
  30440. +             serialsw++;
  30441. +             continue;
  30442. +         case NSERIALSW:
  30443. +             serialsw = 0;
  30444. +             continue;
  30445. +         case SHOWSW:
  30446. +             showsw++;
  30447. +             continue;
  30448. +         case NSHOWSW:
  30449. +             showsw = 0;
  30450. +             continue;
  30451. +         case SIZESW:
  30452. +             sizesw++;
  30453. +             continue;
  30454. +         case NSIZESW:
  30455. +             sizesw = 0;
  30456. +             continue;
  30457. +         case STORESW:
  30458. +             storesw++;
  30459. +             continue;
  30460. +         case NSTORESW:
  30461. +             storesw = 0;
  30462. +             continue;
  30463. +         case TYPESW:
  30464. +             if (!(cp = *argp++) || *cp == '-')
  30465. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30466. +             if (ntype >= NTYPES)
  30467. +             adios (NULLCP,
  30468. +                    "too many types (starting with %s), %d max",
  30469. +                    cp, NTYPES);
  30470. +             types[ntype++] = cp;
  30471. +             continue;
  30472. +         case VERBSW: 
  30473. +             verbosw++;
  30474. +             continue;
  30475. +         case NVERBSW: 
  30476. +             verbosw = 0;
  30477. +             continue;
  30478. +         case PROGSW:
  30479. +             if (!(progsw = *argp++) || *progsw == '-')
  30480. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30481. +             continue;
  30482. +         case NPROGSW:
  30483. +             nomore++;
  30484. +             continue;
  30485. +         case LENSW:
  30486. +         case WIDSW:
  30487. +             if (!(cp = *argp++) || *cp == '-')
  30488. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30489. +             continue;
  30490. +         case FILESW:
  30491. +             if (!(cp = *argp++) || (*cp == '-' && cp[1]))
  30492. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30493. +             file = *cp == '-' ? cp : path (cp, TFILE);
  30494. +             continue;
  30495. +            case VIAMSW:
  30496. +             if (!(f1 = *argp++))
  30497. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30498. +             continue;
  30499. +            case VIASSW:
  30500. +             if (!(f2 = *argp++))
  30501. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30502. +             continue;
  30503. +            case VIAPSW:
  30504. +             if (!(f3 = *argp++))
  30505. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30506. +             continue;
  30507. +            case VIADSW:
  30508. +             if (!(f4 = *argp++))
  30509. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30510. +             continue;
  30511. +            case VIACSW:
  30512. +             if (!(f5 = *argp++))
  30513. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30514. +             continue;
  30515. +            case VIAZSW:
  30516. +             if (!(cp = *argp++) || *cp == '-')
  30517. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30518. +             if (sscanf (cp, "%d", &f6) != 1 || f6 < 0)
  30519. +             f6 = 300;
  30520. +             continue;
  30521. +            case VIAFSW:
  30522. +             if (!(f7 = *argp++))
  30523. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  30524. +             continue;
  30525. +         }
  30526. +     if (*cp == '+' || *cp == '@') {
  30527. +         if (folder)
  30528. +         adios (NULLCP, "only one folder at a time!");
  30529. +         else
  30530. +         folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
  30531. +     }
  30532. +     else
  30533. +         msgs[msgp++] = cp;
  30534. +     }
  30535. +     parts[npart] = NULL, types[ntype] = NULL;
  30536. +     if (!formsw)
  30537. +     formsw = getcpy (libpath ("mhl.headers"));
  30538. +     set_endian ();
  30539. + /*   */
  30540. +     if (f1) {
  30541. +     via_mail (f1, f2, f3, f4, f5, f6, f7);
  30542. +     /* NOTREACHED */
  30543. +     }
  30544. +     else
  30545. +     if (f2 || f3 || f4 || f5 || f6)
  30546. +         adios (NULLCP, "missing -viamail \"mailpath\" switch");
  30547. +     if (cp = getenv ("MHN")) {
  30548. +     if (fp = fopen (cp, "r")) {
  30549. +         m_readefs ((struct node **) 0, fp, cp, 0);
  30550. +         (void) fclose (fp);
  30551. +     }
  30552. +     else
  30553. +         admonish ("", "unable to read $MHN profile (%s)", cp);
  30554. +     }
  30555. +     if (fp = fopen (cp = libpath ("mhn_defaults"), "r")) {
  30556. +     m_readefs ((struct node **) 0, fp, cp, 0);
  30557. +     (void) fclose (fp);
  30558. +     }
  30559. +     (void) sprintf (buf, "%s-cache", invo_name);
  30560. +     cache = m_find (buf);
  30561. +     cwdlen = strlen (cwd = getcpy (pwd ()));
  30562. +     (void) sprintf (buf, "%s-storage", invo_name);
  30563. +     dir = getcpy ((cp = m_find (buf)) && *cp ? cp : cwd);
  30564. +     tmp = cp && *cp ? concat (cp, "/", invo_name, NULLCP)
  30565. +             : add (m_maildir (invo_name), NULLCP);
  30566. +     if (!m_find ("path"))
  30567. +     free (path ("./", TFOLDER));
  30568. +     if (msgp == 1
  30569. +         && !folder
  30570. +         && !npart
  30571. +         && !showsw
  30572. +         && !storesw
  30573. +         && !ntype
  30574. +         && !file
  30575. +         && (cp = getenv ("mhdraft"))
  30576. +         && strcmp (cp, msgs[0]) == 0) {
  30577. +     build_comp (cp);
  30578. +     /* NOTREACHED */
  30579. +     }
  30580. +     if (file) {
  30581. +     int    stdinP;
  30582. +     if (msgp)
  30583. +         adios (NULLCP, "only one file at a time!");
  30584. +     if ((cts = (CT *) calloc ((unsigned) 2, sizeof *cts)) == NULL)
  30585. +         adios (NULLCP, "out of memory");
  30586. +     ctp = cts;
  30587. +     if (stdinP = (strcmp (file, "-") == 0)) {
  30588. +         char    buffer[BUFSIZ];
  30589. +         file = add (m_tmpfil (invo_name), NULLCP);
  30590. +         if ((fp = fopen (file, "w+")) == NULL)
  30591. +         adios (file, "unable to fopen for writing and reading");
  30592. +         (void) chmod (file, 0600);
  30593. +         while (fgets (buffer, sizeof buffer, stdin))
  30594. +         (void) fputs (buffer, fp);
  30595. +         (void) fflush (fp);
  30596. +         if (ferror (stdin)) {
  30597. +         (void) unlink (file);
  30598. +         adios ("stdin", "error reading");
  30599. +         }
  30600. +         if (ferror (fp)) {
  30601. +         (void) unlink (file);
  30602. +         adios (file, "error writing");
  30603. +         }
  30604. +         (void) fseek (fp, 0L, 0);
  30605. +     }
  30606. +     else
  30607. +         if ((fp = fopen (file, "r")) == NULL)
  30608. +         adios (file, "unable to read");
  30609. +     if (ct = get_content (fp, file, 1)) {
  30610. +         if (stdinP)
  30611. +         ct -> c_unlink = 1;
  30612. +         ct -> c_fp = NULL;
  30613. +         if (ct -> c_end == 0L) {
  30614. +         (void) fseek (fp, 0L, 2);
  30615. +         ct -> c_end = ftell (fp);
  30616. +         }
  30617. +         if (ct -> c_ctinitfnx && (*ct -> c_ctinitfnx) (ct) == NOTOK)
  30618. +         free_content (ct);
  30619. +         else
  30620. +         *ctp++ = ct;
  30621. +     }
  30622. +     else
  30623. +         advise (NULLCP, "unable to decode %s", file);
  30624. +     (void) fclose (fp);
  30625. +     mp = NULL;
  30626. +     goto go_to_it;
  30627. +     }
  30628. +     if (!msgp)
  30629. +     msgs[msgp++] = "cur";
  30630. +     if (!folder)
  30631. +     folder = m_getfolder ();
  30632. +     maildir = m_maildir (folder);
  30633. +     if (chdir (maildir) == NOTOK)
  30634. +     adios (maildir, "unable to change directory to");
  30635. +     if (!(mp = m_gmsg (folder)))
  30636. +     adios (NULLCP, "unable to read folder %s", folder);
  30637. +     if (mp -> hghmsg == 0)
  30638. +     adios (NULLCP, "no messages in %s", folder);
  30639. +     for (msgnum = 0; msgnum < msgp; msgnum++)
  30640. +     if (!m_convert (mp, msgs[msgnum]))
  30641. +         done (1);
  30642. +     m_setseq (mp);
  30643. +     if ((cts = (CT *) calloc ((unsigned) (mp -> numsel + 1), sizeof *cts))
  30644. +         == NULL)
  30645. +     adios (NULLCP, "out of memory");
  30646. +     ctp = cts;
  30647. +     for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
  30648. +     if (mp -> msgstats[msgnum] & SELECTED) {
  30649. +         char   *msgnam;
  30650. +         if ((fp = fopen (msgnam = m_name (msgnum), "r")) == NULL)
  30651. +         adios (msgnam, "unable to read message");
  30652. +         if (ct = get_content (fp, msgnam, 1)) {
  30653. +         ct -> c_fp = NULL;
  30654. +         if (ct -> c_end == 0L) {
  30655. +             (void) fseek (fp, 0L, 2);
  30656. +             ct -> c_end = ftell (fp);
  30657. +         }
  30658. +         if (ct -> c_ctinitfnx && (*ct -> c_ctinitfnx) (ct) == NOTOK)
  30659. +             free_content (ct);
  30660. +         else
  30661. +             *ctp++ = ct;
  30662. +         }
  30663. +         else
  30664. +         advise (NULLCP, "unable to decode message %s", msgnam);
  30665. +         (void) fclose (fp);
  30666. +     }
  30667. + go_to_it: ;
  30668. +     if (!*cts)
  30669. +     done (1);
  30670. +     if (!listsw && !showsw && !storesw)
  30671. +     showsw++;
  30672. + /* listsw && showsw        -> user wants per-message listing,
  30673. +                    so delay until showsw processing
  30674. +       && storesw && sizesw    -> evaluating size will cause more work,
  30675. +                    so delay until after storesw processing
  30676. +  */
  30677. +     userrs = 1;
  30678. +     (void) signal (SIGQUIT, quitser);
  30679. +     (void) signal (SIGPIPE, pipeser);
  30680. +     for (ctp = cts; ct = *ctp; ctp++)
  30681. +     if (type_ok (ct)
  30682. +             && (ct -> c_ctlistfnx
  30683. +                 || ct -> c_ctstorefnx
  30684. +                 || ct -> c_ctshowfnx)) {
  30685. +         struct    stat st;
  30686. +         if (!ct -> c_umask)
  30687. +         ct -> c_umask = ~(stat (ct -> c_file, &st) != NOTOK
  30688. +                     ? (st.st_mode & 0777) : m_gmprot ());
  30689. +     }
  30690. +     if (listsw && !showsw && (!storesw || !sizesw)) {
  30691. +     if (headsw)
  30692. +         printf (LSTFMT1, "msg", "part", "type/subtype", "size",
  30693. +             "description");
  30694. +     for (ctp = cts; ct = *ctp; ctp++)
  30695. +         if (type_ok (ct) && ct -> c_ctlistfnx) {
  30696. +         (void) umask (ct -> c_umask);
  30697. +         (void) (*ct -> c_ctlistfnx) (ct, 1);
  30698. +         if (ct -> c_fp)
  30699. +             (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  30700. +         }
  30701. +     flush_errors ();
  30702. +     }
  30703. +     if (storesw) {
  30704. +     for (ctp = cts; ct = *ctp; ctp++)
  30705. +         if (type_ok (ct) && ct -> c_ctstorefnx) {
  30706. +         (void) umask (ct -> c_umask);
  30707. +         (void) (*ct -> c_ctstorefnx) (ct, NULLCP);
  30708. +         if (ct -> c_fp)
  30709. +             (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  30710. +         }
  30711. +     flush_errors ();
  30712. +     }
  30713. +     if (listsw && !showsw && storesw && sizesw) {
  30714. +     if (headsw)
  30715. +         printf (LSTFMT1, "msg", "part", "type/subtype", "size",
  30716. +             "description");
  30717. +     for (ctp = cts; ct = *ctp; ctp++)
  30718. +         if (type_ok (ct) && ct -> c_ctlistfnx) {
  30719. +         (void) umask (ct -> c_umask);
  30720. +         (void) (*ct -> c_ctlistfnx) (ct, 1);
  30721. +         if (ct -> c_fp)
  30722. +             (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  30723. +         }
  30724. +     flush_errors ();
  30725. +     listsw = 0;
  30726. +     }
  30727. +     if (showsw)
  30728. +     for (ctp = cts; ct = *ctp; ctp++) {
  30729. +         int        child_id,
  30730. +             i,
  30731. +             vecp;
  30732. +         char   *vec[8];
  30733. + #if defined(BSD42) && !defined(WAITINT)
  30734. +         union wait status;
  30735. + #else
  30736. +         int     status;
  30737. + #endif
  30738. +         TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  30739. +         if (!type_ok (ct))
  30740. +         continue;
  30741. +         (void) umask (ct -> c_umask);
  30742. +         if (listsw) {
  30743. +         if (headsw)
  30744. +             printf (LSTFMT1, "msg", "part", "type/subtype", "size",
  30745. +                 "description");
  30746. +         if (ct -> c_ctlistfnx)
  30747. +             (void) (*ct -> c_ctlistfnx) (ct, 1);
  30748. +         }
  30749. +         if (!ct -> c_ctshowfnx) {
  30750. +         if (ct -> c_fp)
  30751. +             (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  30752. +         continue;
  30753. +         }
  30754. +         vecp = 0;
  30755. +         vec[vecp++] = r1bindex (mhlproc, '/');
  30756. +         vec[vecp++] = "-form";
  30757. +         vec[vecp++] = formsw;
  30758. +         vec[vecp++] = "-nobody";
  30759. +         vec[vecp++] = ct -> c_file;
  30760. +         if (nomore)
  30761. +         vec[vecp++] = "-nomoreproc";
  30762. +         else
  30763. +         if (progsw) {
  30764. +             vec[vecp++] = "-moreproc";
  30765. +             vec[vecp++] = progsw;
  30766. +         }
  30767. +         vec[vecp] = NULL;
  30768. +         (void) fflush (stdout);
  30769. +         for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
  30770. +         sleep (5);
  30771. +         switch (child_id) {
  30772. +             case NOTOK:
  30773. +             adios ("fork", "unable to");
  30774. +             /* NOTREACHED */
  30775. +         case OK:
  30776. +             (void) execvp (mhlproc, vec);
  30777. +             fprintf (stderr, "unable to exec ");
  30778. +             perror (mhlproc);
  30779. +             _exit (-1);
  30780. +             /* NOTREACHED */
  30781. +         default:
  30782. +             xpid = child_id;
  30783. +             break;
  30784. +         }
  30785. +         (void) (*ct -> c_ctshowfnx) (ct, 1, 0);
  30786. +         if (ct -> c_fp)
  30787. +         (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  30788. +         hstat = signal (SIGHUP, SIG_IGN);
  30789. +         istat = signal (SIGINT, SIG_IGN);
  30790. +         qstat = signal (SIGQUIT, SIG_IGN);
  30791. +         tstat = signal (SIGTERM, SIG_IGN);
  30792. +         while (wait (&status) != NOTOK) {
  30793. + #if defined(BSD42) && !defined(WAITINT)
  30794. +         (void) pidcheck (status.w_status);
  30795. + #else
  30796. +         (void) pidcheck (status);
  30797. + #endif
  30798. +         continue;
  30799. +         }
  30800. +         (void) signal (SIGHUP, hstat);
  30801. +         (void) signal (SIGINT, istat);
  30802. +         (void) signal (SIGQUIT, qstat);
  30803. +         (void) signal (SIGTERM, tstat);
  30804. +         xpid = 0;
  30805. +         flush_errors ();
  30806. +     }
  30807. +     for (ctp = cts; *ctp; ctp++)
  30808. +     free_content (*ctp);
  30809. +     free ((char *) cts);
  30810. +     cts = NULL;
  30811. +     if (mp) {
  30812. +     m_replace (pfolder, folder);
  30813. +     if (mp -> hghsel != mp -> curmsg)
  30814. +         m_setcur (mp, mp -> hghsel);
  30815. +     m_sync (mp);
  30816. +     m_update ();
  30817. +     }
  30818. +     done (0);
  30819. +     /* NOTREACHED */
  30820. + }
  30821. + /*   */
  30822. + static TYPESIG  pipeser (i)
  30823. + int    i;
  30824. + {
  30825. +     if (i == SIGQUIT) {
  30826. +     (void) unlink ("core");
  30827. +     (void) fflush (stdout);
  30828. +     fprintf (stderr, "\n");
  30829. +     (void) fflush (stderr);
  30830. +     }
  30831. +     done (1);
  30832. +     /* NOTREACHED */
  30833. + }
  30834. + /*   */
  30835. + #include "../h/mhn.h"
  30836. + struct str2init {
  30837. +     char   *si_key;
  30838. +     int        si_value;
  30839. +     int   (*si_init) ();
  30840. + };
  30841. + static int InitApplication (), InitMessage (), InitMultiPart (), InitText ();
  30842. +         
  30843. + static struct str2init str2cts[] = {
  30844. +     "application",  CT_APPLICATION, InitApplication,
  30845. +     "audio",        CT_AUDIO,        NULL,
  30846. +     "image",        CT_IMAGE,        NULL,
  30847. +     "message",        CT_MESSAGE,        InitMessage,
  30848. +     "multipart",    CT_MULTIPART,   InitMultiPart,
  30849. +     "text",        CT_TEXT,        InitText,
  30850. +     "video",        CT_VIDEO,        NULL,
  30851. +     NULL,        CT_EXTENSION,   NULL,    /* these two must be last! */
  30852. +     NULL,        CT_UNKNOWN,        NULL,
  30853. + };
  30854. + static int InitBase64 (), InitQuoted (), Init7Bit ();
  30855. + static struct str2init str2ces[] = {
  30856. +     "base64",        CE_BASE64,    InitBase64,
  30857. +     "quoted-printable", CE_QUOTED,    InitQuoted,
  30858. +     "8bit",        CE_8BIT,    Init7Bit,
  30859. +     "7bit",        CE_7BIT,    Init7Bit,
  30860. +     "binary",        CE_BINARY,    NULL,
  30861. +     NULL,        CE_EXTENSION,    NULL,    /* these two must be last! */
  30862. +     NULL,        CE_UNKNOWN,    NULL,
  30863. + };
  30864. + /*   */
  30865. + static    CT    get_content (in, file, toplevel)
  30866. + FILE   *in;
  30867. + char   *file;
  30868. + int    toplevel;
  30869. + {
  30870. +     int     compnum,
  30871. +         state;
  30872. +     char    buf[BUFSIZ],
  30873. +         name[NAMESZ];
  30874. +     register CT    ct;
  30875. +     if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
  30876. +     adios (NULLCP, "out of memory");
  30877. +     ct -> c_begin = ftell (ct -> c_fp = in) + 1;
  30878. +     ct -> c_file = add (file, NULLCP);
  30879. +     for (compnum = 1, state = FLD;;) {
  30880. +     switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
  30881. +         case FLD:
  30882. +         case FLDPLUS:
  30883. +         case FLDEOF:
  30884. +             compnum++;
  30885. +         if (uleq (name, VRSN_FIELD)) {
  30886. +             register char  *cp;
  30887. +             cp = add (buf, NULLCP);
  30888. +             while (state == FLDPLUS) {
  30889. +             state = m_getfld (state, name, buf, sizeof buf, in);
  30890. +             cp = add (buf, cp);
  30891. +             }
  30892. +             if (ct -> c_vrsn) {
  30893. +             char   *dp = trimcpy (cp);
  30894. +             advise (NULLCP,
  30895. +                 "message %s has multiple %s: fields (%s)",
  30896. +                 ct -> c_file, VRSN_FIELD, dp);
  30897. +             free (dp);
  30898. +             free (cp);
  30899. +             goto out;
  30900. +             }
  30901. +             ct -> c_vrsn = cp;
  30902. + #ifdef    whocares
  30903. +             while (isspace (*cp))
  30904. +             cp++;
  30905. +             for (dp = cp; istoken (*dp); dp++)
  30906. +             continue;
  30907. +             c = *dp, *dp = NULL;
  30908. +             if (!uleq (cp, VRSN_VALUE)) {
  30909. +             if (!isspace (c))
  30910. +                 *dp = c;
  30911. +             advise (NULLCP,
  30912. +                 "message %s has unsupported value for %s: field (%s)",
  30913. +                 ct -> c_file, VRSN_FIELD, cp);
  30914. +             goto out;
  30915. +             }
  30916. +             *dp = c;
  30917. + #endif
  30918. +             goto got_header;
  30919. +         }
  30920. +         if (uleq (name, TYPE_FIELD)) {
  30921. +             register char  *cp;
  30922. +             register struct str2init *s2i;
  30923. +             register CI        ci = &ct -> c_ctinfo;
  30924. +             cp = add (buf, NULLCP);
  30925. +             while (state == FLDPLUS) {
  30926. +             state = m_getfld (state, name, buf, sizeof buf, in);
  30927. +             cp = add (buf, cp);
  30928. +             }
  30929. +             if (ct -> c_ctline) {
  30930. +             char   *dp = trimcpy (cp);
  30931. +             advise (NULLCP,
  30932. +                 "message %s has multiple %s: fields (%s)",
  30933. +                 ct -> c_file, TYPE_FIELD, dp);
  30934. +             free (dp);
  30935. +             free (cp);
  30936. +             goto out;
  30937. +             }
  30938. +             if (get_ctinfo (cp, ct, 0) == NOTOK)
  30939. +             goto out;
  30940. +             for (s2i = str2cts; s2i -> si_key; s2i++)
  30941. +             if (uleq (ci -> ci_type, s2i -> si_key))
  30942. +                 break;
  30943. +             if (!s2i -> si_key && !uprf (ci -> ci_type, "X-"))
  30944. +             s2i++;
  30945. +             ct -> c_type = s2i -> si_value;
  30946. +             ct -> c_ctinitfnx = s2i -> si_init;
  30947. +             goto got_header;
  30948. +         }
  30949. +         if (uleq (name, ENCODING_FIELD)) {
  30950. +             register char *cp,
  30951. +                   *dp;
  30952. +             char    c;
  30953. +             register struct str2init *s2i;
  30954. +             cp = add (buf, NULLCP);
  30955. +             while (state == FLDPLUS) {
  30956. +             state = m_getfld (state, name, buf, sizeof buf, in);
  30957. +             cp = add (buf, cp);
  30958. +             }
  30959. +             if (ct -> c_celine) {
  30960. +             advise (NULLCP,
  30961. +                 "message %s has multiple %s: fields (%s)",
  30962. +                 ct -> c_file, ENCODING_FIELD,
  30963. +                 dp = trimcpy (cp));
  30964. +             free (dp);
  30965. +             free (cp);
  30966. +             goto out;
  30967. +             }
  30968. +             ct -> c_celine = cp;
  30969. +             while (isspace (*cp))
  30970. +             cp++;
  30971. +             for (dp = cp; istoken (*dp); dp++)
  30972. +             continue;
  30973. +             c = *dp, *dp = '\0';
  30974. +             for (s2i = str2ces; s2i -> si_key; s2i++)
  30975. +             if (uleq (cp, s2i -> si_key))
  30976. +                 break;
  30977. +             if (!s2i -> si_key && !uprf (cp, "X-"))
  30978. +             s2i++;
  30979. +             *dp = c;
  30980. +             ct -> c_encoding = s2i -> si_value;
  30981. +             if (s2i -> si_init && (*s2i -> si_init) (ct) == NOTOK)
  30982. +             goto out;
  30983. +             goto got_header;
  30984. +         }
  30985. +         if (uleq (name, ID_FIELD)) {
  30986. +             ct -> c_id = add (buf, ct -> c_id);
  30987. +             while (state == FLDPLUS) {
  30988. +             state = m_getfld (state, name, buf, sizeof buf, in);
  30989. +             ct -> c_id = add (buf, ct -> c_id);
  30990. +             }
  30991. +             goto got_header;
  30992. +         }
  30993. +         if (uleq (name, DESCR_FIELD)) {
  30994. +             ct -> c_descr = add (buf, ct -> c_descr);
  30995. +             while (state == FLDPLUS) {
  30996. +             state = m_getfld (state, name, buf, sizeof buf, in);
  30997. +             ct -> c_descr = add (buf, ct -> c_descr);
  30998. +             }
  30999. +             goto got_header;
  31000. +         }
  31001. + #ifdef    notdef
  31002. +         if (uprf (name, XXX_FIELD_PRF))
  31003. +             advise (NULLCP, "unknown field (%s) in message %s",
  31004. +                 name, ct -> c_file);
  31005. +         /* and fall... */
  31006. + #endif
  31007. +         while (state == FLDPLUS)
  31008. +             state = m_getfld (state, name, buf, sizeof buf, in);
  31009. + got_header: ;
  31010. +         if (state != FLDEOF) {
  31011. +             ct -> c_begin = ftell (in) + 1;
  31012. +             continue;
  31013. +         }
  31014. +         /* else fall... */
  31015. +         case BODY:
  31016. +         case BODYEOF:
  31017. +         break;
  31018. +         case FILEEOF:
  31019. +         ct -> c_begin = ftell (in);
  31020. +         break;
  31021. +         case LENERR:
  31022. +         case FMTERR:
  31023. +         adios (NULLCP, "message format error in component #%d",
  31024. +                compnum);
  31025. +         default:
  31026. +         adios (NULLCP, "getfld() returned %d", state);
  31027. +     }
  31028. +     break;
  31029. +     }
  31030. +     if (!ct -> c_ctline) {
  31031. +     if (toplevel < 0) {
  31032. +         if (get_ctinfo ("message/rfc822", ct, 0) == NOTOK)
  31033. +         goto out;
  31034. +         ct -> c_type = CT_MESSAGE;
  31035. +         ct -> c_ctinitfnx = InitMessage;
  31036. +     }
  31037. +     else {
  31038. +         if (get_ctinfo ("text/plain", ct, 0) == NOTOK)
  31039. +         goto out;
  31040. +         ct -> c_type = CT_TEXT;
  31041. +         ct -> c_ctinitfnx = InitText;
  31042. +     }
  31043. +     }
  31044. +     if (!ct -> c_ctlistfnx)
  31045. +     ct -> c_ctlistfnx = list_content;
  31046. +     if (!ct -> c_ctshowfnx)
  31047. +     ct -> c_ctshowfnx = show_content;
  31048. +     if (!ct -> c_ctstorefnx)
  31049. +     ct -> c_ctstorefnx = store_content;
  31050. +     if (!ct -> c_celine) {
  31051. +     ct -> c_encoding = CE_7BIT;
  31052. +     (void) Init7Bit (ct);
  31053. +     }
  31054. +     return ct;
  31055. + out:
  31056. +     free_content (ct);
  31057. +     return NULLCT;
  31058. + }
  31059. + /*   */
  31060. + static int  get_ctinfo (cp, ct, magic)
  31061. + char  *cp;
  31062. + register CT    ct;
  31063. + int    magic;
  31064. + {
  31065. +     int        i = strlen (invo_name) + 2;
  31066. +     register char  *dp,
  31067. +           **ap,
  31068. +           **ep;
  31069. +     char    c;
  31070. +     register CI        ci = &ct -> c_ctinfo;
  31071. +     cp = ct -> c_ctline = add (cp, NULLCP);
  31072. +     while (isspace (*cp))
  31073. +     cp++;
  31074. +     for (dp = index (cp, '\n'); dp; dp = index (dp, '\n'))
  31075. +     *dp++ = ' ';
  31076. +     for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
  31077. +     if (!isspace (*dp))
  31078. +         break;
  31079. +     *++dp = '\0';
  31080. +     if (debugsw)
  31081. +     fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp);
  31082. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31083. +     return NOTOK;
  31084. +     for (dp = cp; istoken (*dp); dp++)
  31085. +     continue;
  31086. +     c = *dp, *dp = '\0';
  31087. +     ci -> ci_type = add (cp, NULLCP);
  31088. +     *dp = c, cp = dp;
  31089. +     if (!*ci -> ci_type) {
  31090. +     advise (NULLCP, "invalid %s: field in message %s (empty type)", 
  31091. +         TYPE_FIELD, ct -> c_file);
  31092. +     return NOTOK;
  31093. +     }
  31094. +     for (dp = ci -> ci_type; *dp; dp++)
  31095. +     if (isalpha(*dp) && isupper (*dp))
  31096. +         *dp = tolower (*dp);
  31097. +     while (isspace (*cp))
  31098. +     cp++;
  31099. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31100. +     return NOTOK;
  31101. +     if (*cp != '/') {
  31102. +     if (!magic)
  31103. +         ci -> ci_subtype = add ("", NULLCP);
  31104. +     goto magic_skip;
  31105. +     }
  31106. +     cp++;
  31107. +     while (isspace (*cp))
  31108. +     cp++;
  31109. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31110. +     return NOTOK;
  31111. +     for (dp = cp; istoken (*dp); dp++)
  31112. +     continue;
  31113. +     c = *dp, *dp = '\0';
  31114. +     ci -> ci_subtype = add (cp, NULLCP);
  31115. +     *dp = c, cp = dp;
  31116. +     if (!*ci -> ci_subtype) {
  31117. +     advise (NULLCP,
  31118. +         "invalid %s: field in message %s (empty subtype for \"%s\")",
  31119. +         TYPE_FIELD, ct -> c_file, ci -> ci_type);
  31120. +     return NOTOK;
  31121. +     }
  31122. +     for (dp = ci -> ci_subtype; *dp; dp++)
  31123. +     if (isalpha(*dp) && isupper (*dp))
  31124. +         *dp = tolower (*dp);
  31125. + magic_skip: ;
  31126. +     while (isspace (*cp))
  31127. +     cp++;
  31128. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31129. +     return NOTOK;
  31130. +     ep = (ap = ci -> ci_attrs) + NPARMS;
  31131. +     while (*cp == ';') {
  31132. +     char   *vp,
  31133. +            *up;
  31134. +     if (ap >= ep) {
  31135. +         advise (NULLCP,
  31136. +             "too many parameters in message %s's %s: field (%d max)",
  31137. +             ct -> c_file, TYPE_FIELD, NPARMS);
  31138. +         return NOTOK;
  31139. +     }
  31140. +     cp++;
  31141. +     while (isspace (*cp))
  31142. +         cp++;
  31143. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31144. +         return NOTOK;
  31145. +     if (*cp == 0) {
  31146. +         advise (NULLCP,
  31147. +             "extraneous trailing ';' in message %s's %s: parameter list",
  31148. +             ct -> c_file, TYPE_FIELD);
  31149. +         return OK;
  31150. +     }
  31151. +     for (dp = cp; istoken (*dp); dp++)
  31152. +         if (isalpha(*dp) && isupper (*dp))
  31153. +         *dp = tolower (*dp);
  31154. +     for (up = dp; isspace (*dp); )
  31155. +         dp++;
  31156. +     if (dp == cp || *dp != '=') {
  31157. +         advise (NULLCP,
  31158. +             "invalid parameter in message %s's %s: field\n%*.*sparameter %s (error detected at offset %d)",
  31159. +             ct -> c_file, TYPE_FIELD, i, i, "", cp, dp - cp);
  31160. +         return NOTOK;
  31161. +     }
  31162. +     vp = (*ap = add (cp, NULLCP)) + (up - cp);
  31163. +     *vp = '\0';
  31164. +     for (dp++; isspace (*dp); )
  31165. +         dp++;
  31166. +     ci -> ci_values[ap - ci -> ci_attrs] = vp = *ap + (dp - cp);
  31167. +     if (*dp == '"') {
  31168. +         for (cp = ++dp, dp = vp;;) {
  31169. +         switch (c = *cp++) {
  31170. +             case '\0':
  31171. + bad_quote: ;
  31172. +                 advise (NULLCP,
  31173. +                 "invalid quoted-string in message %s's %s: field\n%*.*s(parameter %s)",
  31174. +                 ct -> c_file, TYPE_FIELD, i, i, "", *ap);
  31175. +             return NOTOK;
  31176. +             case '\\':
  31177. +             *dp++ = c;
  31178. +             if ((c = *cp++) == '\0')
  31179. +                 goto bad_quote;
  31180. +             /* else fall... */
  31181. +             default:
  31182. +                 *dp++ = c;
  31183. +                 continue;
  31184. +             case '"':
  31185. +             *dp = '\0';
  31186. +             break;
  31187. +         }
  31188. +         break;
  31189. +         }
  31190. +     }
  31191. +     else {
  31192. +         for (cp = dp, dp = vp; istoken (*cp); cp++, dp++)
  31193. +         continue;
  31194. +         *dp = '\0';
  31195. +     }
  31196. +     if (!*vp) {
  31197. +         advise (NULLCP,
  31198. +             "invalid parameter in message %s's %s: field\n%*.*s(parameter %s)",
  31199. +             ct -> c_file, TYPE_FIELD, i, i, "", *ap);
  31200. +         return NOTOK;
  31201. +     }
  31202. +     ap++;
  31203. +     while (isspace (*cp))
  31204. +         cp++;
  31205. +     if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
  31206. +         return NOTOK;
  31207. +     }
  31208. +     if (magic && *cp == '[') {
  31209. +     ct -> c_descr = ++cp;
  31210. +     for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
  31211. +         if (*dp == ']')
  31212. +         break;
  31213. +     if (dp < cp) {
  31214. +         advise (NULLCP, "invalid description in message %s", ct -> c_file);
  31215. +         ct -> c_descr = NULL;
  31216. +         return NOTOK;
  31217. +     }
  31218. +     
  31219. +     c = *dp, *dp = '\0';
  31220. +     if (*ct -> c_descr)
  31221. +         ct -> c_descr = concat (ct -> c_descr, "\n", NULLCP);
  31222. +     else
  31223. +         ct -> c_descr = NULL;
  31224. +     *dp++ = c, cp = dp;
  31225. +     while (isspace (*cp))
  31226. +         cp++;
  31227. +     }
  31228. +     if (*cp) {
  31229. +     if (magic)
  31230. +         ci -> ci_magic = add (cp, NULLCP);
  31231. +     else
  31232. +         advise (NULLCP,
  31233. +             "extraneous information in message %s's %s: field\n%*.*s(%s)",
  31234. +         ct -> c_file, TYPE_FIELD, i, i, "", cp);
  31235. +     }
  31236. +     return OK;
  31237. + }
  31238. + /*   */
  31239. + static int  get_comment (ct, ap)
  31240. + CT    ct;
  31241. + char  **ap;
  31242. + {
  31243. +     register int    i;
  31244. +     register char  *bp,
  31245. +            *cp;
  31246. +     char    c,
  31247. +         buffer[BUFSIZ],
  31248. +        *dp;
  31249. +     register CI        ci = &ct -> c_ctinfo;
  31250. +     cp = *ap;
  31251. +     bp = buffer;
  31252. +     cp++;
  31253. +     for (i = 0;;) {
  31254. +     switch (c = *cp++) {
  31255. +         case '\0':
  31256. + invalid: ;
  31257. +             advise (NULLCP, "invalid comment in message %s's %s: field",
  31258. +             ct -> c_file, TYPE_FIELD);
  31259. +         return NOTOK;
  31260. +         case '\\':
  31261. +         *bp++ = c;
  31262. +         if ((c = *cp++) == '\0')
  31263. +             goto invalid;
  31264. +         *bp++ = c;
  31265. +         continue;
  31266. +         case '(':
  31267. +         i++;
  31268. +         /* and fall... */
  31269. +             default:
  31270. +         *bp++ = c;
  31271. +         continue;
  31272. +         case ')':
  31273. +         if (--i < 0)
  31274. +             break;
  31275. +         *bp++ = c;
  31276. +         continue;
  31277. +     }
  31278. +     break;
  31279. +     }
  31280. +     *bp = '\0';
  31281. +     if (dp = ci -> ci_comment) {
  31282. +     ci -> ci_comment = concat (dp, " ", buffer, NULLCP);
  31283. +     free (dp);
  31284. +     }
  31285. +     else
  31286. +     ci -> ci_comment = add (buffer, NULLCP);
  31287. +     while (isspace (*cp))
  31288. +     cp++;
  31289. +     *ap = cp;
  31290. +     return OK;
  31291. + }
  31292. + /*   */
  31293. + #define    empty(s)    ((s) ? (s) : "")
  31294. + static int  list_content (ct, toplevel)
  31295. + register CT    ct;
  31296. + int    toplevel;
  31297. + {
  31298. +     unsigned long size;
  31299. +     register char **ap,
  31300. +           **ep;
  31301. +     char   *cp,
  31302. +         buffer[BUFSIZ];
  31303. +     register CI        ci = &ct -> c_ctinfo;
  31304. +     printf (toplevel > 0 ? LSTFMT2a : toplevel < 0 ? "part " : "     ",
  31305. +         atoi (r1bindex (empty (ct -> c_file), '/')));
  31306. +     (void) sprintf (buffer, "%s/%s", empty (ci -> ci_type),
  31307. +             empty (ci -> ci_subtype));
  31308. +     printf (LSTFMT2b, empty (ct -> c_partno), buffer);
  31309. +     size = ct -> c_cesizefnx && sizesw ? (*ct -> c_cesizefnx) (ct)
  31310. +                        : ct -> c_end - ct -> c_begin;
  31311. +     for (cp = " KMGT"; size > 9999; size >>= 10)
  31312. +     if (!*++cp)
  31313. +         break;
  31314. +     switch (*cp) {
  31315. +         case ' ':
  31316. +         if (size > 0 || ct -> c_encoding != CE_EXTERNAL)
  31317. +         printf (LSTFMT2c1, size);
  31318. +         else
  31319. +         printf (LSTFMT2c4);
  31320. +         break;
  31321. +     default:
  31322. +         printf (LSTFMT2c2, size, *cp);
  31323. +         break;
  31324. +     case '\0':
  31325. +         printf (LSTFMT2c3);
  31326. +     }
  31327. +     if (ct -> c_descr) {
  31328. +     char   *dp;
  31329. +     dp = trimcpy (cp = add (ct -> c_descr, NULLCP));
  31330. +     free (cp);
  31331. +     printf (LSTFMT2d1, dp);
  31332. +     free (dp);
  31333. +     }
  31334. +     printf ("\n");
  31335. +     if (verbosw && ci -> ci_comment) {
  31336. +     char   *dp;
  31337. +     dp = trimcpy (cp = add (ci -> ci_comment, NULLCP));
  31338. +     free (cp);
  31339. +     (void) sprintf (buffer, "(%s)", dp);
  31340. +     free (dp);
  31341. +     printf (LSTFMT2d2, buffer);
  31342. +     }
  31343. +     if (!debugsw)
  31344. +     return OK;
  31345. +     (void) fflush (stdout);
  31346. +     fprintf (stderr, "  partno \"%s\"\n", empty (ct -> c_partno));
  31347. +     if (ct -> c_vrsn)
  31348. +     fprintf (stderr, "  %s:%s", VRSN_FIELD, ct -> c_vrsn);
  31349. +     if (ct -> c_ctline)
  31350. +     fprintf (stderr, "  %s:%s", TYPE_FIELD, ct -> c_ctline);
  31351. +     fprintf (stderr,
  31352. +          "    type \"%s\"  subtype \"%s\"  comment \"%s\"  magic \"%s\"\n",
  31353. +          empty (ci -> ci_type), empty (ci -> ci_subtype),
  31354. +          empty (ci -> ci_comment), empty (ci -> ci_magic));
  31355. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
  31356. +     fprintf (stderr, "      parameter %s=\"%s\"\n", *ap, *ep);
  31357. +     fprintf (stderr,
  31358. +          "    type 0x%x subtype 0x%x params 0x%x\n",
  31359. +          ct -> c_type, ct -> c_subtype, ct -> c_ctparams);
  31360. +     fprintf (stderr, "     showproc \"%s\"\n", empty (ct -> c_showproc));
  31361. +     fprintf (stderr, "     termproc \"%s\"\n", empty (ct -> c_termproc));
  31362. +     fprintf (stderr, "    storeproc \"%s\"\n", empty (ct -> c_storeproc));
  31363. +     if (ct -> c_celine)
  31364. +     fprintf (stderr, "  %s:%s", ENCODING_FIELD, ct -> c_celine);
  31365. +     fprintf (stderr, "    encoding 0x%x params 0x%x\n",
  31366. +          ct -> c_encoding, ct -> c_ceparams);
  31367. +     if (ct -> c_id)
  31368. +     fprintf (stderr, "  %s:%s", ID_FIELD, ct -> c_id);
  31369. +     if (ct -> c_descr)
  31370. +     fprintf (stderr, "  %s:%s", DESCR_FIELD, ct -> c_descr);
  31371. +     fprintf (stderr, "  fp 0x%x file \"%s\" begin %d end %d\n",
  31372. +          ct -> c_fp, empty (ct -> c_file), ct -> c_begin, ct -> c_end);
  31373. +     if (ct -> c_celistfnx)
  31374. +     (void) (*ct -> c_celistfnx) (ct);
  31375. +     return OK;
  31376. + }
  31377. + #undef    empty
  31378. + /*   */
  31379. + #ifdef VSPRINTF
  31380. + #ifdef __STDC__
  31381. + #include <stdarg.h>
  31382. + #else
  31383. + #include <varargs.h>
  31384. + #endif
  31385. + #endif
  31386. + #ifdef VSPRINTF
  31387. + #ifdef __STDC__
  31388. + static void content_error (char *what, register CT ct, char *fmt, ...)
  31389. + #else
  31390. + static void  content_error (va_alist)
  31391. + va_dcl
  31392. + #endif
  31393. + #else    /* !VSPRINTF */
  31394. + /* VARARGS3 */
  31395. + static void  content_error (what, ct, fmt, a, b, c, d, e, f)
  31396. + char   *what,
  31397. +        *fmt,
  31398. +        *a,
  31399. +        *b,
  31400. +        *c,
  31401. +        *d,
  31402. +        *e,
  31403. +        *f;
  31404. + register CT    ct;
  31405. + #endif
  31406. + {
  31407. + #ifdef VSPRINTF
  31408. +     va_list arglist;
  31409. + #endif
  31410. + #if defined(VSPRINTF) && !defined(__STDC__)
  31411. +     char *what, *fmt;
  31412. +     register CT ct;
  31413. + #endif
  31414. +     int        i;
  31415. +     register char *bp;
  31416. +     char   buffer[BUFSIZ];
  31417. +     register CI       ci;
  31418. +     bp = buffer;
  31419. +     if (userrs && invo_name && *invo_name) {
  31420. +     (void) sprintf (bp, "%s: ", invo_name);
  31421. +     bp += strlen (bp);
  31422. +     }
  31423. + #ifdef VSPRINTF
  31424. + #ifdef __STDC__
  31425. +     va_start (arglist, fmt);
  31426. + #else
  31427. +     va_start (arglist);
  31428. +     what = va_arg(arglist, char *);
  31429. +     ct   = va_arg(arglist, CT);
  31430. +     fmt  = va_arg(arglist, char *);
  31431. + #endif
  31432. +     (void) vsprintf (bp, fmt, arglist);
  31433. +     bp += strlen (bp);
  31434. + #else
  31435. +     (void) sprintf (bp, fmt, a, b, c, d, e, f);
  31436. +     bp += strlen (bp);
  31437. + #endif
  31438. +     ci = &ct -> c_ctinfo;
  31439. +     if (what) {
  31440. +     if (*what) {
  31441. +         (void) sprintf (bp, " %s: ", what);
  31442. +         bp += strlen (bp);
  31443. +     }
  31444. +     if (errno > 0 && errno < sys_nerr)
  31445. +         (void) sprintf (bp, "%s", sys_errlist[errno]);
  31446. +     else
  31447. +         (void) sprintf (bp, "Error %d", errno);
  31448. +     bp += strlen (bp);
  31449. +     }
  31450. +     i = strlen (invo_name) + 2;
  31451. +     (void) sprintf (bp, "\n%*.*s(content %s/%s", i, i, "", ci -> ci_type,
  31452. +             ci -> ci_subtype);
  31453. +     bp += strlen (bp);
  31454. +     if (ct -> c_file) {
  31455. +     (void) sprintf (bp, " in message %s", ct -> c_file);
  31456. +     bp += strlen (bp);
  31457. +     if (ct -> c_partno) {
  31458. +         (void) sprintf (bp, ", part %s", ct -> c_partno);
  31459. +         bp += strlen (bp);
  31460. +     }
  31461. +     }
  31462. +     (void) sprintf (bp, ")");
  31463. +     bp += strlen (bp);
  31464. +     if (userrs) {
  31465. +     *bp++ = '\n';
  31466. +     *bp = '\0';
  31467. +     errs = add (buffer, errs);
  31468. +     }
  31469. +     else
  31470. +     advise (NULLCP, "%s", buffer);
  31471. + }
  31472. + static void  flush_errors ()
  31473. + {
  31474. +     if (errs) {
  31475. +     (void) fflush (stdout);
  31476. +     fprintf (stderr, "%s", errs);
  31477. +     free (errs);
  31478. +     errs = NULL;
  31479. +     }
  31480. + }
  31481. + /*   */
  31482. + static    jmp_buf    intrenv;
  31483. + /* ARGSUSED */
  31484. + static TYPESIG  intrser (i)
  31485. + int    i;
  31486. + {
  31487. + #ifdef    BSD42
  31488. +     (void) signal (SIGINT, intrser);
  31489. + #endif
  31490. +     (void) putchar ('\n');
  31491. +     longjmp (intrenv, DONE);
  31492. + }
  31493. + /*   */
  31494. + static int  show_content_aux ();
  31495. + static int  show_content (ct, serial, alternate)
  31496. + register CT    ct;
  31497. + int    serial,
  31498. +     alternate;
  31499. + {
  31500. +     register char  *cp;
  31501. +     char    buffer[BUFSIZ];
  31502. +     register CI ci = &ct -> c_ctinfo;
  31503. +     (void) sprintf (buffer, "%s-show-%s/%s", invo_name, ci -> ci_type,
  31504. +             ci -> ci_subtype);
  31505. +     if ((cp = m_find (buffer)) == NULL || *cp == 0) {
  31506. +     (void) sprintf (buffer, "%s-show-%s", invo_name, ci -> ci_type);
  31507. +     if (((cp = m_find (buffer)) == NULL || *cp == 0)
  31508. +             && (cp = ct -> c_showproc) == NULL) {
  31509. +         if (!alternate)
  31510. +         content_error (NULLCP, ct,
  31511. +                    "don't know how to display content");
  31512. +         return NOTOK;
  31513. +     }
  31514. +     }
  31515. +     return show_content_aux (ct, serial, alternate, cp, NULLCP);
  31516. + }
  31517. + static int  show_content_aux (ct, serial, alternate, cp, cracked)
  31518. + register CT    ct;
  31519. + int    serial,
  31520. +     alternate;
  31521. + register char   *cp;
  31522. + char   *cracked;
  31523. + {
  31524. +     int        child_id,
  31525. +         fd,
  31526. +         i,
  31527. +         xlist,
  31528. +         xpause,
  31529. +         xstdin,
  31530. +         xtty;
  31531. +     register char  *bp;
  31532. +     char   *file,
  31533. +        *vec[4],
  31534. +         buffer[BUFSIZ],
  31535. +         exec[BUFSIZ + sizeof "exec "];
  31536. +     register CI ci = &ct -> c_ctinfo;
  31537. +     if (!ct -> c_ceopenfnx) {
  31538. +     if (!alternate)
  31539. +         content_error (NULLCP, ct, "don't know how to decode content");
  31540. +     return NOTOK;
  31541. +     }
  31542. +     file = NULL;
  31543. +     if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
  31544. +     return NOTOK;
  31545. +     if (ct -> c_showproc && strcmp (ct -> c_showproc, "true") == 0)
  31546. +     return (alternate ? DONE : OK);
  31547. +     
  31548. +     xlist = xpause = xstdin = xtty = 0;
  31549. +     if (cracked) {
  31550. +     (void) strcpy (buffer, cp);
  31551. +     goto got_command;
  31552. +     }
  31553. +     buffer[0] = '\0';
  31554. +     for (bp = buffer; *cp; cp++)
  31555. +     if (*cp == '%') {
  31556. +         switch (*++cp) {
  31557. +         case 'a':    /* additional arguments */
  31558. +             {
  31559. +             register char **ap,
  31560. +                       **ep;
  31561. +             char   *s = "";
  31562. +             for (ap = ci -> ci_attrs, ep = ci -> ci_values;
  31563. +                      *ap;
  31564. +                      ap++, ep++) {
  31565. +                 (void) sprintf (bp, "%s%s=\"%s\"", s, *ap, *ep);
  31566. +                 bp += strlen (bp);
  31567. +                 s = " ";
  31568. +             }
  31569. +             }
  31570. +             break;
  31571. +         case 'e':    /* exclusive execution */
  31572. +             xtty = 1;
  31573. +             break;
  31574. +         case 'F':    /* %e, %f, and stdin is terminal not content */
  31575. +             xstdin = xtty = 1;
  31576. +             /* and fall... */
  31577. +             case 'f':    /* filename */
  31578. +             (void) sprintf (bp, "%s", file);
  31579. +             break;
  31580. +         case 'p':    /* pause prior to displaying content */
  31581. +             xpause = 1;
  31582. +             /* and fall... */
  31583. +         case 'l':    /* display listing prior to displaying
  31584. +                    content */
  31585. +             xlist = 1;
  31586. +             break;
  31587. +         case 's':    /* subtype */
  31588. +             (void) strcpy (bp, ci -> ci_subtype);
  31589. +             break;
  31590. +         case '%':
  31591. +             goto raw;
  31592. +         default:
  31593. +             *bp++ = *--cp;
  31594. +             *bp = '\0';
  31595. +             continue;
  31596. +         }
  31597. +         bp += strlen (bp);
  31598. +     }
  31599. +         else {
  31600. + raw: ;
  31601. +         *bp++ = *cp;
  31602. +         *bp = '\0';
  31603. +     }
  31604. +     if (ct -> c_termproc) {
  31605. +     char    term[BUFSIZ];
  31606. +     (void) strcpy (term, buffer);
  31607. +     (void) sprintf (buffer, ct -> c_termproc, term);
  31608. +     }
  31609. + got_command: ;
  31610. +     if (debugsw || cracked) {
  31611. +     (void) fflush (stdout);
  31612. +     fprintf (stderr, "%s msg %s", cracked ? "storing" : "show",
  31613. +          ct -> c_file);
  31614. +     if (ct -> c_partno)
  31615. +         fprintf (stderr, " part %s", ct -> c_partno);
  31616. +     if (cracked)
  31617. +         fprintf (stderr, " using command (cd %s; %s)\n", cracked, buffer);
  31618. +     else
  31619. +         fprintf (stderr, " using command %s\n", buffer);
  31620. +     }
  31621. +     if (xtty && xpid) {
  31622. +     (void) pidcheck (pidwait (xpid, NOTOK));
  31623. +     xpid = 0;
  31624. +     }
  31625. +     if (xlist) {
  31626. +     char    prompt[BUFSIZ];
  31627. +     if (ct -> c_ctlistfnx) {
  31628. +         (*ct -> c_ctlistfnx) (ct, -1);
  31629. +         if (xpause && SOprintf ("Press <return> to show content..."))
  31630. +         printf ("Press <return> to show content...");
  31631. +     }
  31632. +     else {
  31633. +         register char *pp;
  31634. +         pp = prompt;
  31635. +         if (ct -> c_descr) {
  31636. +         (void) sprintf (pp, "%s (", ct -> c_descr);
  31637. +         pp += strlen (pp);
  31638. +         }
  31639. +         (void) sprintf (pp, "content %s/%s", ci -> ci_type,
  31640. +                 ci -> ci_subtype);
  31641. +         pp += strlen (pp);
  31642. +         if (ct -> c_file) {
  31643. +         (void) sprintf (pp, " in message %s", ct -> c_file);
  31644. +         pp += strlen (pp);
  31645. +         if (ct -> c_partno) {
  31646. +             (void) sprintf (pp, ", part %s", ct -> c_partno);
  31647. +             pp += strlen (pp);
  31648. +         }
  31649. +         }
  31650. +         if (ct -> c_descr) {
  31651. +         (void) sprintf (pp, ")");
  31652. +         pp += strlen (pp);
  31653. +         }
  31654. +         if (!xpause)
  31655. +         printf ("%s\n", prompt);
  31656. +         else
  31657. +         if (SOprintf ("Press <return> to show %s...", prompt))
  31658. +             printf ("Press <return> to show %s...", prompt);
  31659. +     }
  31660. +     if (xpause) {
  31661. +         int        intr;
  31662. +         TYPESIG (*istat) ();
  31663. +         istat = signal (SIGINT, intrser);
  31664. +         if ((intr = setjmp (intrenv)) == OK) {
  31665. +         (void) fflush (stdout);
  31666. +         prompt[0] = 0;
  31667. +         (void) read (fileno (stdout), prompt, sizeof prompt);
  31668. +         }
  31669. +         (void) signal (SIGINT, istat);
  31670. +         if (intr != OK) {
  31671. +         (void) (*ct -> c_ceclosefnx) (ct);
  31672. +         return (alternate ? DONE : NOTOK);
  31673. +         }
  31674. +     }
  31675. +     }
  31676. +     (void) sprintf (exec, "exec %s", buffer);
  31677. +     vec[0] = "/bin/sh";
  31678. +     vec[1] = "-c";
  31679. +     vec[2] = exec;
  31680. +     vec[3] = NULL;
  31681. +     (void) fflush (stdout);
  31682. +     for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
  31683. +     sleep (5);
  31684. +     switch (child_id) {
  31685. +     case NOTOK:
  31686. +         advise ("fork", "unable to");
  31687. +         (void) (*ct -> c_ceclosefnx) (ct);
  31688. +         return NOTOK;
  31689. +     case OK:
  31690. +         if (cracked)
  31691. +         (void) chdir (cracked);
  31692. +         if (!xstdin)
  31693. +         (void) dup2 (fd, 0);
  31694. +         (void) close (fd);
  31695. +         (void) execvp ("/bin/sh", vec);
  31696. +         fprintf (stderr, "unable to exec ");
  31697. +         perror ("/bin/sh");
  31698. +         _exit (-1);
  31699. +         /* NOTREACHED */
  31700. +     default:
  31701. +         if (!serial) {
  31702. +         ct -> c_pid = child_id;
  31703. +         if (xtty)
  31704. +             xpid = child_id;
  31705. +         }
  31706. +         else
  31707. +         (void) pidcheck (pidXwait (child_id, NULLCP));
  31708. +         (void) (*ct -> c_ceclosefnx) (ct);
  31709. +         return (alternate ? DONE : OK);
  31710. +     }
  31711. + }
  31712. + /*   */
  31713. + static int  store_content (ct, append)
  31714. + register CT    ct;
  31715. + char   *append;
  31716. + {
  31717. +     int        appending = append && *append;
  31718. +     long    last,
  31719. +         pos;
  31720. +     register char  *bp,
  31721. +            *cp;
  31722. +     char   *file,
  31723. +         buffer[BUFSIZ];
  31724. +     register CI ci = &ct -> c_ctinfo;
  31725. +     FILE       *fp;
  31726. +     if (appending) {
  31727. +     (void) strcpy (buffer, append);
  31728. +     goto got_filename;
  31729. +     }
  31730. +     if ((cp = ct -> c_storeproc) == NULL || *cp == 0) {
  31731. +     (void) sprintf (buffer, "%s-store-%s/%s", invo_name, ci -> ci_type,
  31732. +             ci -> ci_subtype);
  31733. +     if ((cp = m_find (buffer)) == NULL || *cp == 0) {
  31734. +         (void) sprintf (buffer, "%s-store-%s", invo_name, ci -> ci_type);
  31735. +         if ((cp = m_find (buffer)) == NULL || *cp == 0)
  31736. +         cp = ct -> c_type == CT_MESSAGE ? "+" : "%m%P.%s";
  31737. +     }
  31738. +     }
  31739. +     switch (*cp) {
  31740. +     case '+':
  31741. +     case '@':
  31742. +         {
  31743. +         char   *folder = cp[1] ? path (cp + 1, *cp == '+' ? TFOLDER 
  31744. +                                       : TSUBCWF)
  31745. +                        : m_getfolder ();
  31746. +         struct msgs *mp = NULL;
  31747. +         struct stat st;
  31748. +         if (stat (bp = m_mailpath (folder), &st) == NOTOK) {
  31749. +             int        answer;
  31750. +             char   *ep;
  31751. +             if (errno != ENOENT) {
  31752. +             advise (bp, "error on folder");
  31753. +             goto losing_folder;
  31754. +             }
  31755. +             ep = concat ("Create folder \"", bp, "\"? ", NULLCP);
  31756. +             answer = getanswer (ep);
  31757. +             free (ep);
  31758. +             if (!answer)
  31759. +             goto losing_folder;
  31760. +             if (!makedir (bp)) {
  31761. +             advise (NULLCP, "unable to create folder %s", bp);
  31762. +             goto losing_folder;
  31763. +             }
  31764. +         }
  31765. +         if (mp = m_gmsg (folder))
  31766. +             (void) sprintf (buffer, "%s/%d", mp -> foldpath,
  31767. +                    mp -> hghmsg + 1);
  31768. +         else
  31769. +             advise (NULLCP, "unable to read folder %s", folder);
  31770. + losing_folder: ;
  31771. +         if (cp[1])
  31772. +             free (folder);
  31773. +         if (mp)
  31774. +             m_fmsg (mp);
  31775. +         else
  31776. +             return NOTOK;
  31777. +         }
  31778. +         goto got_filename;
  31779. +     case '/':
  31780. +     case '|':
  31781. +     case '!':
  31782. +         bp = buffer;
  31783. +         buffer[0] = '\0';
  31784. +         break;
  31785. +     default:
  31786. +         bp = autosw ? cwd : dir;
  31787. +         (void) sprintf (buffer, "%s/", bp[1] ? bp : "");
  31788. +         bp = buffer + strlen (buffer);
  31789. +         break;
  31790. +     }
  31791. +     for (; *cp; cp++)
  31792. +     if (*cp == '%') {
  31793. +         switch (*++cp) {
  31794. +         case 'a':    /* additional arguments */
  31795. +             if (buffer[0] != '|' && buffer[0] != '!') {
  31796. +             *bp++ = *--cp;
  31797. +             *bp = '\0';
  31798. +             continue;
  31799. +             }
  31800. +             else {
  31801. +             register char **ap,
  31802. +                       **ep;
  31803. +             char   *s = "";
  31804. +             for (ap = ci -> ci_attrs, ep = ci -> ci_values;
  31805. +                      *ap;
  31806. +                      ap++, ep++) {
  31807. +                 (void) sprintf (bp, "%s%s=\"%s\"", s, *ap, *ep);
  31808. +                 bp += strlen (bp);
  31809. +                 s = " ";
  31810. +             }
  31811. +             }
  31812. +             break;
  31813. +         case 'm':    /* message */
  31814. +             (void) sprintf (bp, "%s", r1bindex (ct -> c_file, '/'));
  31815. +             break;
  31816. +         case 'P':    /* .part */
  31817. +             if (ct -> c_partno)
  31818. +             (void) sprintf (bp, ".%s", ct -> c_partno);
  31819. +             break;
  31820. +         case 'p':    /* part */
  31821. +             if (ct -> c_partno)
  31822. +             (void) strcpy (bp, ct -> c_partno);
  31823. +             break;
  31824. +         case 't':    /* type */
  31825. +             (void) strcpy (bp, ci -> ci_type);
  31826. +             break;
  31827. +         case 's':    /* subtype */
  31828. +             (void) strcpy (bp, ci -> ci_subtype);
  31829. +             break;
  31830. +         case '%':
  31831. +             goto raw;
  31832. +         default:
  31833. +             *bp++ = *--cp;
  31834. +             *bp = '\0';
  31835. +             continue;
  31836. +         }
  31837. +         bp += strlen (bp);
  31838. +     }
  31839. +     else {
  31840. + raw: ;
  31841. +         *bp++ = *cp;
  31842. +         *bp = '\0';
  31843. +     }
  31844. +     if (buffer[0] == '|' || buffer[0] == '!')
  31845. +     return show_content_aux (ct, 1, 0, buffer + 1, autosw ? cwd : dir);
  31846. + got_filename: ;
  31847. +     ct -> c_storage = add (buffer, NULLCP);
  31848. + /*
  31849. +     if (debugsw) {
  31850. +  */
  31851. +     (void) fflush (stdout);
  31852. +     fprintf (stderr, "storing message %s", ct -> c_file);
  31853. +     if (ct -> c_partno)
  31854. +         fprintf (stderr, " part %s", ct -> c_partno);
  31855. +     fprintf (stderr, " as file %s\n",
  31856. +          strncmp (ct -> c_storage, cwd, cwdlen)
  31857. +             || ct -> c_storage[cwdlen] != '/'
  31858. +             ? ct -> c_storage
  31859. +             : ct -> c_storage + cwdlen + 1);
  31860. + /*
  31861. +     }
  31862. +  */
  31863. +     if (ct -> c_encoding != CE_7BIT) {
  31864. +     int    cc,
  31865. +         fd;
  31866. +     if (!ct -> c_ceopenfnx) {
  31867. +         advise (NULLCP, "don't know how to decode part %s of message %s",
  31868. +             ct -> c_partno, ct -> c_file);
  31869. +         return NOTOK;
  31870. +     }
  31871. +     file = appending || !strcmp (ct -> c_storage, "-") ? NULLCP
  31872. +                                : ct -> c_storage;
  31873. +     if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
  31874. +         return NOTOK;
  31875. +     if (strcmp (file, ct -> c_storage) == 0) {
  31876. +         (void) (*ct -> c_ceclosefnx) (ct);
  31877. +         return OK;
  31878. +     }
  31879. +     if (!strcmp (ct -> c_storage, "-")) {
  31880. +         int        gd;
  31881. +         if ((gd = dup (fileno (stdout))) == NOTOK) {
  31882. +         advise ("stdout", "unable to dup");
  31883. + losing: ;
  31884. +         (void) (*ct -> c_ceclosefnx) (ct);
  31885. +         return NOTOK;
  31886. +         }
  31887. +         if ((fp = fdopen (gd, appending ? "a" : "w")) == NULL) {
  31888. +         advise ("stdout", "unable to fdopen (%d, \"%s\") from", gd,
  31889. +             appending ? "a" : "w");
  31890. +         (void) close (gd);
  31891. +         goto losing;
  31892. +         }
  31893. +     }
  31894. +     else
  31895. +         if ((fp = fopen (ct -> c_storage, appending ? "a" : "w"))
  31896. +             == NULL) {
  31897. +         advise (ct -> c_storage, "unable to fopen for %s",
  31898. +             appending ? "appending" : "writing");
  31899. +         goto losing;
  31900. +         }
  31901. +     if (append && !*append)
  31902. +         (void) copy_some_headers (fp, ct);
  31903. +     for (;;) {
  31904. +         switch (cc = read (fd, buffer, sizeof buffer)) {
  31905. +         case NOTOK:
  31906. +             advise (file, "error reading content from");
  31907. +             break;
  31908. +         case OK:
  31909. +             break;
  31910. +         default:
  31911. +             (void) fwrite (buffer, sizeof *buffer, cc, fp);
  31912. +             continue;
  31913. +         }
  31914. +         break;
  31915. +     }
  31916. +     (void) (*ct -> c_ceclosefnx) (ct);
  31917. +     if (cc != NOTOK && fflush (fp))
  31918. +         advise (ct -> c_storage, "error writing to");
  31919. +     (void) fclose (fp);
  31920. +     return (cc != NOTOK ? OK : NOTOK);
  31921. +     }
  31922. +     if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  31923. +     advise (ct -> c_file, "unable to open for reading");
  31924. +     return NOTOK;
  31925. +     }
  31926. +     (void) fseek (ct -> c_fp, pos = ct -> c_begin, 0);
  31927. +     last = ct -> c_end;
  31928. +     if (!strcmp (ct -> c_storage, "-")) {
  31929. +     int    gd;
  31930. +     if ((gd = dup (fileno (stdout))) == NOTOK) {
  31931. +         advise ("stdout", "unable to dup");
  31932. +         return NOTOK;
  31933. +     }
  31934. +     if ((fp = fdopen (gd, appending ? "a" : "w")) == NULL) {
  31935. +         advise ("stdout", "unable to fdopen (%d, \"%s\") from", gd,
  31936. +             appending ? "a" : "w");
  31937. +         (void) close (gd);
  31938. +         return NOTOK;
  31939. +     }
  31940. +     }
  31941. +     else
  31942. +     if ((fp = fopen (ct -> c_storage, appending ? "a" : "w")) == NULL) {
  31943. +         advise (ct -> c_storage, "unable to fopen for %s",
  31944. +             appending ? "appending" : "writing");
  31945. +         return NOTOK;
  31946. +     }
  31947. +     if (append && !*append) {
  31948. +     (void) copy_some_headers (fp, ct);
  31949. +     appending = 1;
  31950. +     }
  31951. +     else
  31952. +     appending = 0;
  31953. +     while (fgets (buffer, sizeof buffer - 1, ct -> c_fp)) {
  31954. +     if ((pos += strlen (buffer)) > last) {
  31955. +         int        diff = strlen (buffer) - (pos - last);
  31956. +         if (diff >= 0)
  31957. +         buffer[diff] = '\0';
  31958. +     }
  31959. +     if (appending)
  31960. +         switch (buffer[0]) {
  31961. +         case ' ':
  31962. +         case '\t':
  31963. +             if (appending < 0)
  31964. +             buffer[0] = 0;
  31965. +             break;
  31966. +         case '\n':
  31967. +             appending = 0;
  31968. +             break;
  31969. +         default:
  31970. +             if (!uprf (buffer, XXX_FIELD_PRF)
  31971. +                 && !uprf (buffer, "Message-ID:")) {
  31972. +             appending = -1;
  31973. +             buffer[0] = 0;
  31974. +             break;
  31975. +             }
  31976. +             appending = 1;
  31977. +             break;
  31978. +         }
  31979. +     (void) fputs (buffer, fp);
  31980. +     if (pos >= last)
  31981. +         break;
  31982. +     }
  31983. +     if (fflush (fp))
  31984. +     advise (ct -> c_storage, "error writing to");
  31985. +     (void) fclose (fp);
  31986. +     (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  31987. +     return OK;
  31988. + }
  31989. + static int  copy_some_headers (out, ct)
  31990. + FILE   *out;
  31991. + register CT    ct;
  31992. + {
  31993. +     int        state;
  31994. +     char    buf[BUFSIZ],
  31995. +         name[NAMESZ];
  31996. +     FILE   *in;
  31997. +     if ((in = fopen (ct -> c_file, "r")) == NULL) {
  31998. +     advise (ct -> c_file, "unable to open for reading");
  31999. +     return NOTOK;
  32000. +     }
  32001. +     for (state = FLD;;) {
  32002. +     switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
  32003. +         case FLD:
  32004. +         case FLDPLUS:
  32005. +         case FLDEOF:
  32006. +         if (uprf (name, XXX_FIELD_PRF) || uleq (name, "Message-ID")) {
  32007. +             while (state == FLDPLUS)
  32008. +             state = m_getfld (state, name, buf, sizeof buf, in);
  32009. +             continue;
  32010. +         }
  32011. +         fprintf (out, "%s:%s", name, buf);
  32012. +         while (state == FLDPLUS) {
  32013. +             state = m_getfld (state, name, buf, sizeof buf, in);
  32014. +             (void) fputs (buf, out);
  32015. +         }
  32016. +         if (state != FLDEOF)
  32017. +             continue;
  32018. +         /* else fall... */
  32019. +        case BODY:
  32020. +        case BODYEOF:
  32021. +        case FILEEOF:
  32022. +         break;
  32023. +        case LENERR:
  32024. +        case FMTERR:
  32025. +        default:
  32026. +         break;
  32027. +     }
  32028. +     break;
  32029. +     }
  32030. +     (void) fclose (in);
  32031. +     return OK;
  32032. + }
  32033. + /*   */
  32034. + static void  free_ctinfo (ct)
  32035. + register CT    ct;
  32036. + {
  32037. +     register char **ap;
  32038. +     register CI    ci = &ct -> c_ctinfo;
  32039. +     if (ci -> ci_type)
  32040. +     free (ci -> ci_type);
  32041. +     if (ci -> ci_subtype)
  32042. +     free (ci -> ci_subtype);
  32043. +     for (ap = ci -> ci_attrs; *ap; ap++)
  32044. +     free (*ap);
  32045. +     if (ci -> ci_comment)
  32046. +     free (ci -> ci_comment);
  32047. +     if (ci -> ci_magic)
  32048. +     free (ci -> ci_magic);
  32049. + }
  32050. + static void  free_content (ct)
  32051. + register CT    ct;
  32052. + {
  32053. +     if (!ct)
  32054. +     return;
  32055. +     if (ct -> c_partno)
  32056. +     free (ct -> c_partno);
  32057. +     if (ct -> c_vrsn)
  32058. +     free (ct -> c_vrsn);
  32059. +     if (ct -> c_ctline)
  32060. +     free (ct -> c_ctline);
  32061. +     free_ctinfo (ct);
  32062. +     if (ct -> c_ctfreefnx)
  32063. +     (void) (*ct -> c_ctfreefnx) (ct);
  32064. +     if (ct -> c_showproc)
  32065. +     free (ct -> c_showproc);
  32066. +     if (ct -> c_termproc)
  32067. +     free (ct -> c_termproc);
  32068. +     if (ct -> c_storeproc)
  32069. +     free (ct -> c_storeproc);
  32070. +     if (ct -> c_celine)
  32071. +     free (ct -> c_celine);
  32072. +     if (ct -> c_cefreefnx)
  32073. +     (void) (*ct -> c_cefreefnx) (ct, 1);
  32074. +     if (ct -> c_id)
  32075. +     free (ct -> c_id);
  32076. +     if (ct -> c_descr)
  32077. +     free (ct -> c_descr);
  32078. +     if (ct -> c_file) {
  32079. +     if (ct -> c_unlink)
  32080. +         (void) unlink (ct -> c_file);
  32081. +     free (ct -> c_file);
  32082. +     }
  32083. +     if (ct -> c_fp)
  32084. +     (void) fclose (ct -> c_fp);
  32085. +     if (ct -> c_storage)
  32086. +     (void) free (ct -> c_storage);
  32087. +     free ((char *) ct);
  32088. + }
  32089. + /*   */
  32090. + static int  part_ok (ct)
  32091. + register CT    ct;
  32092. + {
  32093. +     register char **ap;
  32094. +     if (ct -> c_type == CT_MULTIPART || npart == 0)
  32095. +     return 1;
  32096. +     for (ap = parts; *ap; ap++)
  32097. +     if (strcmp (*ap, ct -> c_partno) == 0)
  32098. +         return 1;
  32099. +     return 0;
  32100. + }
  32101. + static int  type_ok (ct)
  32102. + register CT    ct;
  32103. + {
  32104. +     register char **ap;
  32105. +     char    buffer[BUFSIZ];
  32106. +     register CI        ci = &ct -> c_ctinfo;
  32107. +     if (ct -> c_type == CT_MULTIPART || ntype == 0)
  32108. +     return 1;
  32109. +     (void) sprintf (buffer, "%s/%s", ci -> ci_type, ci -> ci_subtype);
  32110. +     for (ap = types; *ap; ap++)
  32111. +     if (uleq (*ap, ci -> ci_type) || uleq (*ap, buffer))
  32112. +         return 1;
  32113. +     return 0;
  32114. + }
  32115. + /*     CONTENTS */
  32116. + struct k2v {
  32117. +     char   *kv_key;
  32118. +     int        kv_value;
  32119. + };
  32120. + /*     TEXT */
  32121. + #define    TEXT_UNKNOWN    0x00
  32122. + #define    TEXT_PLAIN    0x01
  32123. + #define    TEXT_RICHTEXT    0x02
  32124. + struct text {
  32125. +     int        tx_charset;
  32126. + #define    CHARSET_UNKNOWN    0x00
  32127. + #define    CHARSET_USASCII    0x01
  32128. + #define    CHARSET_LATIN    0x02
  32129. + };
  32130. + static struct k2v    Charset[] = {
  32131. +     "us-ascii",        CHARSET_USASCII,
  32132. +     "iso-8859-1",   CHARSET_LATIN,
  32133. +     NULL,        CHARSET_UNKNOWN        /* this one must be last! */
  32134. + };
  32135. + static int  free_text (ct)
  32136. + register CT    ct;
  32137. + {
  32138. +     register struct text *t = (struct text *) ct -> c_ctparams;
  32139. +     if (!t)
  32140. +     return;
  32141. +     free ((char *) t);
  32142. +     ct -> c_ctparams = NULL;
  32143. + }
  32144. + static struct k2v    SubText[] = {
  32145. +     "plain",        TEXT_PLAIN,
  32146. +     "richtext",        TEXT_RICHTEXT,
  32147. +     NULL,        TEXT_UNKNOWN        /* this one must be last! */
  32148. + };
  32149. + static int  InitText (ct)
  32150. + register CT    ct;
  32151. + {
  32152. +     char   buffer[BUFSIZ];
  32153. +     register char **ap,
  32154. +           **ep;
  32155. +     register struct k2v *kv;
  32156. +     register CI    ci = &ct -> c_ctinfo;
  32157. +     if (!*ci -> ci_subtype)    /* XXX: attmail bogosity! */
  32158. +     ci -> ci_subtype = add ("plain", ci -> ci_subtype);
  32159. +     for (kv = SubText; kv -> kv_key; kv++)
  32160. +     if (uleq (ci -> ci_subtype, kv -> kv_key))
  32161. +         break;
  32162. +     if ((ct -> c_subtype = kv -> kv_value) == TEXT_PLAIN) {
  32163. +     (void) sprintf (buffer, "%%p%s '%%F'",
  32164. +             progsw ? progsw
  32165. +                    : moreproc && *moreproc ? moreproc : "more");
  32166. +     ct -> c_showproc = add (buffer, NULLCP);
  32167. +     }
  32168. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
  32169. +     if (uleq (*ap, "charset")) {
  32170. +         char   *cp;
  32171. +         register struct text *t;
  32172. +         if ((t = (struct text *) calloc (1, sizeof *t)) == NULL)
  32173. +         adios (NULLCP, "out of memory");
  32174. +         ct -> c_ctparams = (caddr_t) t;
  32175. +         ct -> c_ctfreefnx = free_text;
  32176. +         for (kv = Charset; kv -> kv_key; kv++)
  32177. +         if (uleq (*ep, kv -> kv_key)) {
  32178. +             (void) sprintf (buffer, "%s-charset-%s", invo_name,
  32179. +                     kv -> kv_key);
  32180. +             break;
  32181. +         }
  32182. +         t -> tx_charset = kv -> kv_value;
  32183. +         if (!kv -> kv_key)
  32184. +         (void) sprintf (buffer, "%s-charset-%s", invo_name, *ep);
  32185. +         if ((!mm_charset || !uleq (mm_charset, *ep))
  32186. +             && (cp = m_find (buffer)))
  32187. +         ct -> c_termproc = getcpy (cp);
  32188. +         
  32189. +         break;
  32190. +     }
  32191. +     return OK;
  32192. + }
  32193. + /*     MULTIPART */
  32194. + #define    MULTI_UNKNOWN    0x00
  32195. + #define    MULTI_MIXED    0x01
  32196. + #define    MULTI_ALTERNATE    0x02
  32197. + #define    MULTI_DIGEST    0x03
  32198. + #define    MULTI_PARALLEL    0x04
  32199. + struct multipart {
  32200. +     char   *mp_start;
  32201. +     char   *mp_stop;
  32202. +     struct part {
  32203. +     CT  mp_part;
  32204. +     struct part *mp_next;
  32205. +     }       *mp_parts;
  32206. + };
  32207. + static int  list_multi (ct, toplevel)
  32208. + register CT    ct;
  32209. + int    toplevel;
  32210. + {
  32211. +     register struct multipart *m = (struct multipart *) ct -> c_ctparams;
  32212. +     register struct part *part;
  32213. +     (void) list_content (ct, toplevel);
  32214. +     for (part = m -> mp_parts; part; part = part -> mp_next) {
  32215. +     register CT  p = part -> mp_part;
  32216. +     if (part_ok (p) && type_ok (p) && p -> c_ctlistfnx)
  32217. +         (void) (*p -> c_ctlistfnx) (p, 0);
  32218. +     }
  32219. +     return OK;
  32220. + }
  32221. + static int  show_multi (ct, serial, alternate)
  32222. + register CT    ct;
  32223. + int    serial,
  32224. +     alternate;
  32225. + {
  32226. +     int        alternating,
  32227. +         nowalternate,
  32228. +         nowserial,
  32229. +         result;
  32230. +     register struct multipart *m = (struct multipart *) ct -> c_ctparams;
  32231. +     register struct part *part;
  32232. +     register CT  p;
  32233. +     TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
  32234. +     alternating = 0;
  32235. +     nowalternate = alternate;
  32236. +     switch (ct -> c_subtype) {
  32237. +     case MULTI_PARALLEL:
  32238. +         if (!(nowserial = serialsw)) {
  32239. + set_signals: ;
  32240. +         hstat = signal (SIGHUP, SIG_IGN);
  32241. +         istat = signal (SIGINT, SIG_IGN);
  32242. +         qstat = signal (SIGQUIT, SIG_IGN);
  32243. +         tstat = signal (SIGTERM, SIG_IGN);
  32244. +         }
  32245. +         break;
  32246. +     case MULTI_ALTERNATE:
  32247. +         nowalternate = alternating = 1;
  32248. +         /* and fall... */
  32249. +     default:
  32250. +         if (!(nowserial = serial))
  32251. +         goto set_signals;
  32252. +         break;
  32253. +     }
  32254. + /* alternate -> we're inside an alternative
  32255. +    alternating -> we are an alternative
  32256. +  */
  32257. +     result = OK;
  32258. +     for (part = m -> mp_parts; part; part = part -> mp_next) {
  32259. +     p = part -> mp_part;
  32260. +     if (part_ok (p)
  32261. +             && type_ok (p)
  32262. +             && p -> c_ctshowfnx) {
  32263. +         switch ((*p -> c_ctshowfnx) (p, nowserial, nowalternate)) {
  32264. +         case NOTOK:
  32265. +             if (alternate && !alternating) {
  32266. +             result = NOTOK;
  32267. +             goto out;
  32268. +             }
  32269. +             continue;
  32270. +         case OK:
  32271. +         case DONE:
  32272. +             if (alternating) {
  32273. +             result = DONE;
  32274. +             break;
  32275. +             }
  32276. +             if (alternate)
  32277. +             alternate = nowalternate = 0;
  32278. +             continue;
  32279. +         }
  32280. +         break;
  32281. +     }
  32282. +     }
  32283. +     if (alternating && !part) {
  32284. +     if (!alternate)
  32285. +         content_error (NULLCP, ct,
  32286. +                "don't know how to display any of the contents");
  32287. +     result = NOTOK;
  32288. +     goto out;
  32289. +     }
  32290. +     if (serial && !nowserial) {
  32291. +     int    pid,
  32292. +         kids;
  32293. + #if defined(BSD42) && !defined(WAITINT)
  32294. +     union wait status;
  32295. + #else
  32296. +     int     status;
  32297. + #endif
  32298. +     kids = 0;
  32299. +     for (part = m -> mp_parts; part; part = part -> mp_next) {
  32300. +         p = part -> mp_part;
  32301. +         if (p -> c_pid > OK)
  32302. +         if (kill (p -> c_pid, 0) == NOTOK)
  32303. +             p -> c_pid = 0;
  32304. +         else
  32305. +             kids++;
  32306. +     }
  32307. +     while (kids > 0 && (pid = wait (&status)) != NOTOK) {
  32308. + #if defined(BSD42) && !defined(WAITINT)
  32309. +         (void) pidcheck (status.w_status);
  32310. + #else
  32311. +         (void) pidcheck (status);
  32312. + #endif
  32313. +         for (part = m -> mp_parts; part; part = part -> mp_next) {
  32314. +         p = part -> mp_part;
  32315. +         if (xpid == pid)
  32316. +             xpid = 0;
  32317. +         if (p -> c_pid == pid) {
  32318. +             p -> c_pid = 0;
  32319. +             kids--;
  32320. +             break;
  32321. +         }
  32322. +         }
  32323. +     }
  32324. +     }
  32325. + out: ;
  32326. +     if (!nowserial) {
  32327. +     (void) signal (SIGHUP, hstat);
  32328. +     (void) signal (SIGINT, istat);
  32329. +     (void) signal (SIGQUIT, qstat);
  32330. +     (void) signal (SIGTERM, tstat);
  32331. +     }
  32332. +     return result;
  32333. + }
  32334. + /* ARGSUSED */
  32335. + static int  store_multi (ct, unused)
  32336. + register CT    ct;
  32337. + char   *unused;
  32338. + {
  32339. +     int        result;
  32340. +     register struct multipart *m = (struct multipart *) ct -> c_ctparams;
  32341. +     register struct part *part;
  32342. +     result = NOTOK;
  32343. +     for (part = m -> mp_parts; part; part = part -> mp_next) {
  32344. +     register CT  p = part -> mp_part;
  32345. +     if (part_ok (p)
  32346. +             && type_ok (p)
  32347. +             && p -> c_ctstorefnx
  32348. +             && (result = (*p -> c_ctstorefnx) (p, NULLCP)) == OK
  32349. +             && ct -> c_subtype == MULTI_ALTERNATE)
  32350. +         break;
  32351. +     }
  32352. +     return result;
  32353. + }
  32354. + static int  free_multi (ct)
  32355. + register CT    ct;
  32356. + {
  32357. +     register struct multipart *m = (struct multipart *) ct -> c_ctparams;
  32358. +     register struct part   *part,
  32359. +                *next;
  32360. +     if (!m)
  32361. +     return;
  32362. +     if (m -> mp_start)
  32363. +     free (m -> mp_start);
  32364. +     if (m -> mp_stop)
  32365. +     free (m -> mp_stop);
  32366. +     
  32367. +     for (part = m -> mp_parts; part; part = next) {
  32368. +     next = part -> mp_next;
  32369. +     free_content (part -> mp_part);
  32370. +     free ((char *) part);
  32371. +     }
  32372. +     m -> mp_parts = NULL;
  32373. +     free ((char *) m);
  32374. +     ct -> c_ctparams = NULL;
  32375. + }
  32376. + static struct k2v SubMultiPart[] = {
  32377. +     "mixed",        MULTI_MIXED,
  32378. +     "alternative",  MULTI_ALTERNATE,
  32379. +     "digest",        MULTI_DIGEST,
  32380. +     "parallel",        MULTI_PARALLEL,
  32381. +     NULL,        MULTI_UNKNOWN        /* this one must be last! */
  32382. + };
  32383. + static int  InitMultiPart (ct)
  32384. + register CT    ct;
  32385. + {
  32386. +     int        inout;
  32387. +     long    last,
  32388. +         pos;
  32389. +     register char   *cp,
  32390. +             *dp,
  32391. +            **ap,
  32392. +            **ep;
  32393. +     char   *bp,
  32394. +         buffer[BUFSIZ];
  32395. +     register struct multipart *m;
  32396. +     register struct k2v *kv;
  32397. +     register struct part  *part,
  32398. +              **next;
  32399. +     register CI        ci = &ct -> c_ctinfo;
  32400. +     register CT        p;
  32401. +     FILE   *fp;
  32402. +     ct -> c_ctshowfnx = NULL;
  32403. +     ct -> c_ctstorefnx = NULL;
  32404. +     if (ct -> c_encoding != CE_7BIT) {
  32405. +     admonish (NULLCP,
  32406. +           "\"%s/%s\" type in message %s should be encoded in 7bit",
  32407. +           ci -> ci_type, ci -> ci_subtype, ct -> c_file);
  32408. +     return NOTOK;
  32409. +     }
  32410. +     for (kv = SubMultiPart; kv -> kv_key; kv++)
  32411. +     if (uleq (ci -> ci_subtype, kv -> kv_key))
  32412. +         break;
  32413. +     ct -> c_subtype = kv -> kv_value;
  32414. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
  32415. +     if (uleq (*ap, "boundary")) {
  32416. +         bp = *ep;
  32417. +         break;
  32418. +     }
  32419. +     if (!*ap) {
  32420. +     advise (NULLCP,
  32421. +         "a \"boundary\" parameter is mandatory for \"%s/%s\" type in message %s's %s: field",
  32422. +         ci -> ci_type, ci -> ci_subtype, ct -> c_file, TYPE_FIELD);
  32423. +     return NOTOK;
  32424. +     }
  32425. +     
  32426. +     if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
  32427. +     adios (NULLCP, "out of memory");
  32428. +     ct -> c_ctparams = (caddr_t) m;
  32429. +     ct -> c_ctlistfnx = list_multi;
  32430. +     ct -> c_ctshowfnx = show_multi;
  32431. +     ct -> c_ctstorefnx = store_multi;
  32432. +     ct -> c_ctfreefnx = free_multi;
  32433. +     
  32434. +     for (cp = bp; isspace (*cp); cp++)
  32435. +     continue;
  32436. +     if (!*cp) {
  32437. +     advise (NULLCP, "invalid \"boundary\" parameter for \"%s/%s\" type in message %s's %s: field",
  32438. +         ci -> ci_type, ci -> ci_subtype, ct -> c_file, TYPE_FIELD);
  32439. +     return NOTOK;
  32440. +     }
  32441. +     for (cp = bp, dp = cp + strlen (cp) - 1; dp > cp; dp--)
  32442. +     if (!isspace (*dp))
  32443. +         break;
  32444. +     *++dp = '\0';
  32445. +     m -> mp_start = concat (bp, "\n", NULLCP);
  32446. +     m -> mp_stop = concat (bp, "--\n", NULLCP);
  32447. +     if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  32448. +     advise (ct -> c_file, "unable to open for reading");
  32449. +     return NOTOK;
  32450. +     }
  32451. +     (void) fseek (fp = ct -> c_fp, pos = ct -> c_begin, 0);
  32452. +     last = ct -> c_end;
  32453. +     next = &m -> mp_parts, part = NULL, inout = 1;
  32454. +     while (fgets (buffer, sizeof buffer - 1, fp)) {
  32455. +     if (pos > last)
  32456. +         break;
  32457. +     pos += strlen (buffer);
  32458. +     
  32459. +     if (buffer[0] != '-' || buffer[1] != '-')
  32460. +         continue;
  32461. +     if (inout) {
  32462. +         if (strcmp (buffer + 2, m -> mp_start))
  32463. +         continue;
  32464. + next_part: ;
  32465. +         if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
  32466. +         adios (NULLCP, "out of memory");
  32467. +         *next = part, next = &part -> mp_next;
  32468. +         if ((p = get_content (fp, ct -> c_file,
  32469. +                   rfc934sw && ct -> c_subtype == MULTI_DIGEST
  32470. +                             ? -1 : 0)) == NULLCT) {
  32471. +         (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  32472. +         return NOTOK;
  32473. +         }
  32474. +         p -> c_fp = NULL;
  32475. +         part -> mp_part = p;
  32476. +         (void) fseek (fp, pos = p -> c_begin, 0);
  32477. +         inout = 0;
  32478. +     }
  32479. +     else
  32480. +         if (strcmp (buffer + 2, m -> mp_start) == 0) {
  32481. +         inout = 1;
  32482. + end_part: ;
  32483. +         p = part -> mp_part;
  32484. +         p -> c_end = ftell (fp) - (strlen (buffer) + 1);
  32485. +         if (p -> c_end < p -> c_begin)
  32486. +             p -> c_begin = p -> c_end;
  32487. +         if (inout)
  32488. +             goto next_part;
  32489. +         goto last_part;
  32490. +         }
  32491. +         else
  32492. +         if (strcmp (buffer + 2, m -> mp_stop) == 0)
  32493. +             goto end_part;
  32494. +     }
  32495. +     advise (NULLCP, "bogus multipart content in message %s", ct -> c_file);
  32496. +     if (!inout && part) {
  32497. +     p = part -> mp_part;
  32498. +     p -> c_end = ct -> c_end;
  32499. +     if (p -> c_begin >= p -> c_end) {
  32500. +         for (next = &m -> mp_parts;
  32501. +              *next != part;
  32502. +              next = &((*next) -> mp_next))
  32503. +         continue;
  32504. +         *next = NULL;
  32505. +         free_content (p);
  32506. +         free ((char *) part);
  32507. +     }
  32508. +     }
  32509. + last_part: ;
  32510. +     if (ct -> c_subtype == MULTI_ALTERNATE && m -> mp_parts -> mp_next) {
  32511. +     register int    i;
  32512. +     register struct part **base,
  32513. +                  **bmp;
  32514. +     i = 0;
  32515. +     for (part = m -> mp_parts; part; part = part -> mp_next)
  32516. +         i++;
  32517. +     if ((base = (struct part **) calloc ((unsigned) (i + 1), sizeof *base))
  32518. +             == NULL)
  32519. +         adios (NULLCP, "out of memory");
  32520. +     bmp = base;
  32521. +     for (part = m -> mp_parts; part; part = part -> mp_next)
  32522. +         *bmp++ = part;
  32523. +     *bmp = NULL;
  32524. +     next = &m -> mp_parts;
  32525. +     for (bmp--; bmp >= base; bmp--) {
  32526. +         part = *bmp;
  32527. +         *next = part, next = &part -> mp_next;
  32528. +     }
  32529. +     *next = NULL;
  32530. +     free ((char *) base);
  32531. +     }
  32532. +     {
  32533. +     int    partnum;
  32534. +     register char *pp;
  32535. +     char    partnam[BUFSIZ];
  32536. +     if (ct -> c_partno) {
  32537. +         (void) sprintf (partnam, "%s.", ct -> c_partno);
  32538. +         pp = partnam + strlen (partnam);
  32539. +     }
  32540. +     else
  32541. +         pp = partnam;
  32542. +     for (part = m -> mp_parts, partnum = 1;
  32543. +              part;
  32544. +              part = part -> mp_next, partnum++) {
  32545. +         p = part -> mp_part;
  32546. +         (void) sprintf (pp, "%d", partnum);
  32547. +         p -> c_partno = add (partnam, NULLCP);
  32548. +         if (p -> c_ctinitfnx && (*p -> c_ctinitfnx) (p) == NOTOK) {
  32549. +         (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  32550. +         return NOTOK;
  32551. +         }
  32552. +     }
  32553. +     }
  32554. +     (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  32555. +     return OK;
  32556. + }
  32557. + /*     MESSAGE */
  32558. + #define    MESSAGE_UNKNOWN     0x00
  32559. + #define    MESSAGE_RFC822     0x01
  32560. + #define    MESSAGE_PARTIAL     0x02
  32561. + #define    MESSAGE_EXTERNAL 0x03
  32562. + struct partial {
  32563. +     char   *pm_partid;
  32564. +     int        pm_partno;
  32565. +     int        pm_maxno;
  32566. +     int        pm_marked;
  32567. +     int        pm_stored;
  32568. + };
  32569. + static int  list_partial (ct, toplevel)
  32570. + register CT    ct;
  32571. + int    toplevel;
  32572. + {
  32573. +     register struct partial *p = (struct partial *) ct -> c_ctparams;
  32574. +     (void) list_content (ct, toplevel);
  32575. +     if (verbosw) {
  32576. +     printf ("\t     [message %s, part %d", p -> pm_partid, p -> pm_partno);
  32577. +     if (p -> pm_maxno)
  32578. +         printf (" of %d", p -> pm_maxno);
  32579. +     printf ("]\n");
  32580. +     }
  32581. +     return OK;
  32582. + }
  32583. + static int  ct_compar (a, b)
  32584. + CT   *a,
  32585. +      *b;
  32586. + {
  32587. +     register struct  partial *am = (struct partial *) ((*a) -> c_ctparams);
  32588. +     register struct  partial *bm = (struct partial *) ((*b) -> c_ctparams);
  32589. +     return (am -> pm_marked - bm -> pm_marked);
  32590. + }
  32591. + /* ARGSUSED */
  32592. + static int  store_partial (ct, unused)
  32593. + register CT    ct;
  32594. + char   *unused;
  32595. + {
  32596. +     int        cur,
  32597. +         hi,
  32598. +         i;
  32599. +     register CT        p,
  32600. +            *ctp,
  32601. +            *ctq;
  32602. +     CT       *base;
  32603. +     struct partial *qm = (struct partial *) ct -> c_ctparams;
  32604. +     if (qm -> pm_stored)
  32605. +     return OK;
  32606. +     hi = i = 0;
  32607. +     for (ctp = cts; p = *ctp; ctp++)
  32608. +     if (p -> c_type == CT_MESSAGE && p -> c_subtype == ct -> c_subtype) {
  32609. +         register struct partial *pm = (struct partial *) p -> c_ctparams;
  32610. +         if (!pm -> pm_stored
  32611. +                 && strcmp (qm -> pm_partid, pm -> pm_partid) == 0) {
  32612. +         pm -> pm_marked = pm -> pm_partno;
  32613. +         if (pm -> pm_maxno)
  32614. +             hi = pm -> pm_maxno;
  32615. +         pm -> pm_stored = 1;
  32616. +         i++;
  32617. +         }
  32618. +         else
  32619. +         pm -> pm_marked = 0;
  32620. +     }
  32621. +     if (hi == 0) {
  32622. +     advise (NULLCP, "missing (at least) last part of multipart message");
  32623. +     return NOTOK;
  32624. +     }
  32625. +     if ((base = (CT *) calloc ((unsigned) (i + 1), sizeof *base)) == NULL)
  32626. +     adios (NULLCP, "out of memory");
  32627. +     ctq = base;
  32628. +     for (ctp = cts; p = *ctp; ctp++)
  32629. +     if (p -> c_type == CT_MESSAGE && p -> c_subtype == ct -> c_subtype) {
  32630. +         register struct partial *pm = (struct partial *) p -> c_ctparams;
  32631. +         if (pm -> pm_marked)
  32632. +         *ctq++ = p;
  32633. +     }
  32634. +     *ctq = NULL;
  32635. +     if (i > 1)
  32636. +     qsort ((char *) base, i, sizeof *base, ct_compar);
  32637. +     cur = 1;
  32638. +     for (ctq = base; p = *ctq; ctq++) {
  32639. +     register struct partial *pm = (struct partial *) p -> c_ctparams;
  32640. +     if (pm -> pm_marked != cur) {
  32641. +         if (pm -> pm_marked == cur - 1) {
  32642. +         admonish (NULLCP,
  32643. +               "duplicate part %d of %d part multipart message",
  32644. +               pm -> pm_marked, hi);
  32645. +         continue;
  32646. +         }
  32647. + missing_part: ;
  32648. +         advise (NULLCP,
  32649. +             "missing %spart %d of %d part multipart message",
  32650. +             cur != hi ? "(at least) " : "", cur, hi);
  32651. +         goto losing;
  32652. +     }
  32653. +         else
  32654. +         cur++;
  32655. +     }
  32656. +     if (hi != --cur) {
  32657. +     cur = hi;
  32658. +     goto missing_part;
  32659. +     }
  32660. +     ctq = base;
  32661. +     ct = *ctq++;
  32662. +     if (store_content (ct, "") == NOTOK) {
  32663. + losing: ;
  32664. +     free ((char *) base);
  32665. +     return NOTOK;
  32666. +     }
  32667. +     for (; p = *ctq; ctq++)
  32668. +     if (store_content (p, ct -> c_storage) == NOTOK)
  32669. +         goto losing;
  32670. +     free ((char *) base);
  32671. +     return OK;
  32672. + }
  32673. + static int  free_partial (ct)
  32674. + register CT    ct;
  32675. + {
  32676. +     register struct partial *p = (struct partial *) ct -> c_ctparams;
  32677. +     if (!p)
  32678. +     return;
  32679. +     if (p -> pm_partid)
  32680. +     free (p -> pm_partid);
  32681. +     free ((char *) p);
  32682. +     ct -> c_ctparams = NULL;
  32683. + }
  32684. + struct exbody {
  32685. +     CT        eb_parent;
  32686. +     CT        eb_content;
  32687. +     char   *eb_partno;
  32688. +     char   *eb_access;
  32689. +     int        eb_flags;
  32690. +     char   *eb_name;
  32691. +     char   *eb_permission;
  32692. +     char   *eb_site;
  32693. +     char   *eb_dir;
  32694. +     char   *eb_mode;
  32695. +     char   *eb_server;
  32696. +     char   *eb_body;
  32697. +     unsigned long
  32698. +         eb_size;
  32699. + };
  32700. + static    int    openFile ();
  32701. + static    int    openFTP ();
  32702. + static    int    openMail ();
  32703. + /* NOTE WELL: si_key MUST NOT have value of NOTOK */
  32704. + static struct str2init str2methods[] = {
  32705. +     "afs",       1,    openFile,
  32706. +     "anon-ftp",       1,    openFTP,
  32707. +     "ftp",       0,    openFTP,
  32708. +     "local-file",  0,    openFile,
  32709. +     "mail-server", 0,    openMail,
  32710. +     NULL
  32711. + };
  32712. + static int  params_external (ct, composing)
  32713. + register CT    ct;
  32714. + int    composing;
  32715. + {
  32716. +     register char  **ap,
  32717. +            **ep;
  32718. +     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  32719. +     register CI        ci = &ct -> c_ctinfo;
  32720. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
  32721. +     if (uleq (*ap, "access-type")) {
  32722. +         register struct str2init *s2i;
  32723. +         register    CT    p = e -> eb_content;
  32724. +         for (s2i = str2methods; s2i -> si_key; s2i++)
  32725. +         if (uleq (*ep, s2i -> si_key))
  32726. +             break;
  32727. +         if (!s2i -> si_key) {
  32728. +         e -> eb_access = *ep;
  32729. +         e -> eb_flags = NOTOK;
  32730. +         p -> c_encoding = CE_EXTERNAL;
  32731. +         continue;
  32732. +         }
  32733. +         e -> eb_access = s2i -> si_key;
  32734. +         e -> eb_flags = s2i -> si_value;
  32735. +         p -> c_encoding = CE_EXTERNAL;
  32736. +         if (init_encoding (p, s2i -> si_init) == NOTOK)
  32737. +         return NOTOK;
  32738. +         continue;
  32739. +     }
  32740. +     if (uleq (*ap, "name")) {
  32741. +         e -> eb_name = *ep;
  32742. +         continue;
  32743. +     }
  32744. +     if (uleq (*ap, "permission")) {
  32745. +         e -> eb_permission = *ep;
  32746. +         continue;
  32747. +     }
  32748. +     if (uleq (*ap, "site")) {
  32749. +         e -> eb_site = *ep;
  32750. +         continue;
  32751. +     }
  32752. +     if (uleq (*ap, "directory")) {
  32753. +         e -> eb_dir = *ep;
  32754. +         continue;
  32755. +     }
  32756. +     if (uleq (*ap, "mode")) {
  32757. +         e -> eb_mode = *ep;
  32758. +         continue;
  32759. +     }
  32760. +     if (uleq (*ap, "size")) {
  32761. +         (void) sscanf (*ep, "%lu", &e -> eb_size);
  32762. +         continue;
  32763. +     }
  32764. +     if (uleq (*ap, "server")) {
  32765. +         e -> eb_server = *ep;
  32766. +         continue;
  32767. +     }
  32768. +     if (composing && uleq (*ap, "body")) {
  32769. +         e -> eb_body = getcpy (*ep);
  32770. +         continue;
  32771. +     }
  32772. +     }
  32773. +     if (!e -> eb_access) {
  32774. +     advise (NULLCP,
  32775. +         "invalid parameters for \"%s/%s\" type in message %s's %s field",
  32776. +         ci -> ci_type, ci -> ci_subtype,
  32777. +         ct -> c_file, TYPE_FIELD);
  32778. +     return NOTOK;
  32779. +     }
  32780. +     return OK;
  32781. + }
  32782. + static int  list_external (ct, toplevel)
  32783. + register CT    ct;
  32784. + int    toplevel;
  32785. + {
  32786. +     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  32787. +     (void) list_content (ct, toplevel);
  32788. +     if (verbosw) {
  32789. +     if (e -> eb_name)
  32790. +         printf ("\t     retrieve %s\n", e -> eb_name);
  32791. +     if (e -> eb_dir)
  32792. +         printf ("\t in directory %s\n", e -> eb_dir);
  32793. +     if (e -> eb_site)
  32794. +         printf ("\t         from %s\n", e -> eb_site);
  32795. +     if (e -> eb_server)
  32796. +         printf ("\t from mailbox %s\n", e -> eb_server);
  32797. +     printf     ("\t        using %s", e -> eb_access);
  32798. +     if (e -> eb_mode)
  32799. +         printf (" (in %s mode)", e -> eb_mode);
  32800. +     if (e -> eb_permission)
  32801. +         printf (" (permission %s)", e -> eb_permission);
  32802. +     if (e -> eb_flags == NOTOK)
  32803. +         printf (" [service unavailable]");
  32804. +     printf ("\n");
  32805. +     }
  32806. +     (void) list_content (e -> eb_content, 0);
  32807. +     return OK;
  32808. + }
  32809. + static int  show_external (ct, serial, alternate)
  32810. + register CT    ct;
  32811. + int    serial,
  32812. +     alternate;
  32813. + {
  32814. +     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  32815. +     register CT        p = e -> eb_content;
  32816. +     if (!type_ok (p))
  32817. +     return OK;
  32818. +     if (p -> c_ctshowfnx)
  32819. +     return (*p -> c_ctshowfnx) (p, serial, alternate);
  32820. +     content_error (NULLCP, p, "don't know how to display content");
  32821. +     return NOTOK;
  32822. + }
  32823. + static int  store_external (ct)
  32824. + register CT    ct;
  32825. + {
  32826. +     int        result = NOTOK;
  32827. +     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  32828. +     register CT        p = e -> eb_content;
  32829. +     if (!type_ok (p))
  32830. +     return OK;
  32831. +     p -> c_partno = ct -> c_partno;
  32832. +     if (p -> c_ctstorefnx)
  32833. +     result = (*p -> c_ctstorefnx) (p, NULLCP);
  32834. +     p -> c_partno = NULL;
  32835. +     return result;
  32836. + }
  32837. + static int  free_external (ct)
  32838. + register CT    ct;
  32839. + {
  32840. +     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  32841. +     if (!e)
  32842. +     return;
  32843. +     free_content (e -> eb_content);
  32844. +     if (e -> eb_body)
  32845. +     free (e -> eb_body);
  32846. +     free ((char *) e);
  32847. +     ct -> c_ctparams = NULL;
  32848. + }
  32849. + static struct k2v SubMessage[] = {
  32850. +     "rfc822",         MESSAGE_RFC822,
  32851. +     "partial",          MESSAGE_PARTIAL,
  32852. +     "external-body", MESSAGE_EXTERNAL,
  32853. +     NULL,         MESSAGE_UNKNOWN        /* this one must be last! */
  32854. + };
  32855. + static int  InitMessage (ct)
  32856. + register CT    ct;
  32857. + {
  32858. +     register struct k2v *kv;
  32859. +     register CI        ci = &ct -> c_ctinfo;
  32860. +     if (ct -> c_encoding != CE_7BIT) {
  32861. +     admonish (NULLCP,
  32862. +           "\"%s/%s\" type in message %s should be encoded in 7bit",
  32863. +           ci -> ci_type, ci -> ci_subtype, ct -> c_file);
  32864. +     return NOTOK;
  32865. +     }
  32866. +     if (!*ci -> ci_subtype)    /* XXX: attmail bogosity! */
  32867. +     ci -> ci_subtype = add ("rfc822", ci -> ci_subtype);
  32868. +     for (kv = SubMessage; kv -> kv_key; kv++)
  32869. +     if (uleq (ci -> ci_subtype, kv -> kv_key))
  32870. +         break;
  32871. +     switch (ct -> c_subtype = kv -> kv_value) {
  32872. +     case MESSAGE_RFC822:
  32873. +         ct -> c_showproc = add ("%pshow -file '%F'", NULLCP);
  32874. +         break;
  32875. +     case MESSAGE_PARTIAL:
  32876. +         {
  32877. +         register char **ap,
  32878. +                   **ep;
  32879. +         register struct partial *p;
  32880. +         ct -> c_ctshowfnx = NULL;
  32881. +         ct -> c_ctstorefnx = NULL;
  32882. +         if ((p = (struct partial *) calloc (1, sizeof *p)) == NULL)
  32883. +             adios (NULLCP, "out of memory");
  32884. +         ct -> c_ctparams = (caddr_t) p;
  32885. +         ct -> c_ctfreefnx = free_partial;
  32886. +         for (ap = ci -> ci_attrs, ep = ci -> ci_values;
  32887. +                  *ap; 
  32888. +                  ap++, ep++) {
  32889. +             if (uleq (*ap, "id")) {
  32890. +             p -> pm_partid = add (*ep, NULLCP);
  32891. +             continue;
  32892. +             }
  32893. +             if (uleq (*ap, "number")) {
  32894. +             if (sscanf (*ep, "%d", &p -> pm_partno) != 1
  32895. +                     || p -> pm_partno < 1) {
  32896. + invalid_param: ;
  32897. +                 advise (NULLCP,
  32898. +                     "invalid %s parameter for \"%s/%s\" type in message %s's %s field",
  32899. +                     *ap, ci -> ci_type, ci -> ci_subtype,
  32900. +                     ct -> c_file, TYPE_FIELD);
  32901. +                 return NOTOK;
  32902. +             }
  32903. +             continue;
  32904. +             }
  32905. +             if (uleq (*ap, "total")) {
  32906. +             if (sscanf (*ep, "%d", &p -> pm_maxno) != 1
  32907. +                     || p -> pm_maxno < 1)
  32908. +                 goto invalid_param;
  32909. +             continue;
  32910. +             }
  32911. +         }
  32912. +         if (!p -> pm_partid
  32913. +                 || !p -> pm_partno
  32914. +                 || (p -> pm_maxno && p -> pm_partno > p -> pm_maxno)) {
  32915. +             advise (NULLCP,
  32916. +                 "invalid parameters for \"%s/%s\" type in message %s's %s field",
  32917. +                 ci -> ci_type, ci -> ci_subtype,
  32918. +                 ct -> c_file, TYPE_FIELD);
  32919. +             return NOTOK;
  32920. +         }
  32921. +         ct -> c_ctlistfnx = list_partial;
  32922. +         ct -> c_ctstorefnx = store_partial;
  32923. +         }
  32924. +         break;
  32925. +     case MESSAGE_EXTERNAL:
  32926. +         {
  32927. +         int    exresult;
  32928. +         register struct exbody *e;
  32929. +         CT    p;
  32930. +         FILE   *fp;
  32931. +         ct -> c_ctshowfnx = NULL;
  32932. +         ct -> c_ctstorefnx = NULL;
  32933. +         if ((e = (struct exbody *) calloc (1, sizeof *e)) == NULL)
  32934. +             adios (NULLCP, "out of memory");
  32935. +         ct -> c_ctparams = (caddr_t) e;
  32936. +         ct -> c_ctfreefnx = free_external;
  32937. +         if (!ct -> c_fp
  32938. +                 && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  32939. +             advise (ct -> c_file, "unable to open for reading");
  32940. +             return NOTOK;
  32941. +         }
  32942. +         (void) fseek (fp = ct -> c_fp, ct -> c_begin, 0);
  32943. +         if ((p = get_content (fp, ct -> c_file, 0)) == NULLCT) {
  32944. +             (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  32945. +             return NOTOK;
  32946. +         }
  32947. +         e -> eb_parent = ct;
  32948. +         e -> eb_content = p;
  32949. +         p -> c_ctextern = (caddr_t) e;
  32950. +         if ((exresult = params_external (ct, 0)) != NOTOK
  32951. +                 && p -> c_ceopenfnx == openMail) {
  32952. +             int        cc,
  32953. +                 size;
  32954. +             char   *bp;
  32955. +             
  32956. +             if ((size = ct -> c_end - p -> c_begin) <= 0) {
  32957. +             content_error (NULLCP, ct,
  32958. +                        "empty body for access-type=mail-server");
  32959. +             goto no_body;
  32960. +             }
  32961. +             
  32962. +             if ((e -> eb_body = bp = malloc ((unsigned) size)) == NULL)
  32963. +             adios (NULLCP, "out of memory");
  32964. +             (void) fseek (p -> c_fp, p -> c_begin, 0);
  32965. +             while (size > 0)
  32966. +             switch (cc = fread (bp, sizeof *bp, size, p -> c_fp)) {
  32967. +                 case NOTOK:
  32968. +                     adios ("failed", "fread");
  32969. +                 case OK:
  32970. +                 adios (NULLCP, "unexpected EOF from fread");
  32971. +                 default:
  32972. +                 bp += cc, size -= cc;
  32973. +                 break;
  32974. +             }
  32975. +             *bp = 0;
  32976. + no_body: ;
  32977. +         }
  32978. +         p -> c_fp = NULL;
  32979. +         p -> c_end = p -> c_begin;
  32980. +         (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
  32981. +         ct -> c_ctlistfnx = list_external;
  32982. +         if (exresult == NOTOK)
  32983. +             return NOTOK;
  32984. +         if (e -> eb_flags == NOTOK)
  32985. +             return OK;
  32986. +         if (e -> eb_name && autosw) {
  32987. +             char   *cp = e -> eb_name;
  32988. +             if (*cp != '/'
  32989. +                 && *cp != '.'
  32990. +                 && *cp != '|'
  32991. +                 && *cp != '!'
  32992. +                 && !index (cp, '%')) {
  32993. +             if (!ct -> c_storeproc)
  32994. +                 ct -> c_storeproc = add (cp, NULLCP);
  32995. +             if (!p -> c_storeproc)
  32996. +                 p -> c_storeproc = add (cp, NULLCP);
  32997. +             }
  32998. +         }
  32999. +         ct -> c_ctshowfnx = show_external;
  33000. +         ct -> c_ctstorefnx = store_external;
  33001. +         switch (p -> c_type) {
  33002. +             case CT_MULTIPART:
  33003. +                 break;
  33004. +             case CT_MESSAGE:
  33005. +             if (p -> c_subtype != MESSAGE_RFC822)
  33006. +                 break;
  33007. +             /* else fall... */
  33008. +             default:
  33009. +             e -> eb_partno = ct -> c_partno;
  33010. +             if (p -> c_ctinitfnx)
  33011. +                 (void) (*p -> c_ctinitfnx) (p);
  33012. +             break;
  33013. +         }
  33014. +         }
  33015. +         break;
  33016. +     default:
  33017. +         break;
  33018. +     }
  33019. +     return OK;
  33020. + }
  33021. + /*     APPLICATION */
  33022. + #define    APPLICATION_UNKNOWN    0x00
  33023. + #define    APPLICATION_OCTETS    0x01
  33024. + #define    APPLICATION_ODA        0x02
  33025. + #define    APPLICATION_POSTSCRIPT    0x03
  33026. + static int  list_application (ct, toplevel)
  33027. + register CT    ct;
  33028. + int    toplevel;
  33029. + {
  33030. +     (void) list_content (ct, toplevel);
  33031. +     if (verbosw) {
  33032. +     register char **ap,
  33033. +               **ep;
  33034. +     register CI    ci = &ct -> c_ctinfo;
  33035. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
  33036. +         printf ("\t     %s=\"%s\"\n", *ap, *ep);
  33037. +     }
  33038. +     return OK;
  33039. + }
  33040. + static struct k2v SubApplication[] = {
  33041. +     "octet-stream",      APPLICATION_OCTETS,
  33042. +     "oda",          APPLICATION_ODA,
  33043. +     "postscript",      APPLICATION_POSTSCRIPT,
  33044. +     NULL,              APPLICATION_UNKNOWN    /* this one must be last! */
  33045. + };
  33046. + static int  InitApplication (ct)
  33047. + register CT    ct;
  33048. + {
  33049. +     register char **ap,
  33050. +           **ep;
  33051. +     register struct k2v *kv;
  33052. +     register CI        ci = &ct -> c_ctinfo;
  33053. +     ct -> c_ctlistfnx = list_application;
  33054. +     
  33055. +     for (kv = SubApplication; kv -> kv_key; kv++)
  33056. +     if (uleq (ci -> ci_subtype, kv -> kv_key))
  33057. +         break;
  33058. +     if (autosw && !ct -> c_storeproc)
  33059. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
  33060. +         if (uleq (*ap, "name")) {
  33061. +         register char   *cp;
  33062. +         if (*(cp = *ep) != '/'
  33063. +                 && *cp != '.'
  33064. +                 && *cp != '|'
  33065. +                 && *cp != '!'
  33066. +                 && !index (cp, '%'))
  33067. +             ct -> c_storeproc = add (cp, NULLCP);
  33068. +         break;
  33069. +         }
  33070. +     if ((ct -> c_subtype = kv -> kv_value) == APPLICATION_OCTETS) {
  33071. +     int    tarP,
  33072. +         zP;
  33073. +     tarP = zP = 0;
  33074. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
  33075. +         if (uleq (*ap, "type")) {
  33076. +         if (!uleq (*ep, "tar"))
  33077. +             break;
  33078. +         tarP = 1;
  33079. +         continue;
  33080. +         }
  33081. +         if (uleq (*ap, "conversions")
  33082. +             && (uleq (*ep, "compress") || uleq (*ep, "x-compress"))) {
  33083. +         zP = 1;
  33084. +         continue;
  33085. +         }
  33086. +     }
  33087. +     if (tarP) {
  33088. +         ct -> c_showproc = add (zP ? "%euncompress | tar tvf -"
  33089. +                        : "%etar tvf -", NULLCP);
  33090. +         if (!ct -> c_storeproc)
  33091. +         if (autosw) {
  33092. +             ct -> c_storeproc = add (zP ? "| uncompress | tar xvpf -"
  33093. +                             : "| tar xvpf -", NULLCP);
  33094. +             ct -> c_umask = 0022;
  33095. +         }
  33096. +         else
  33097. +             ct -> c_storeproc = add (zP ? "%m%P.tar.Z" : "%m%P.tar",
  33098. +                          NULLCP);
  33099. +     }
  33100. +     }
  33101. +     return OK;
  33102. + }
  33103. + /*     ENCODINGS */
  33104. + struct cefile {
  33105. +     char   *ce_file;
  33106. +     int        ce_unlink;
  33107. +     FILE   *ce_fp;
  33108. + };
  33109. + static int  list_encoding (ct)
  33110. + register CT    ct;
  33111. + {
  33112. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33113. +     if (ce)
  33114. +     fprintf (stderr, "  decoded fp 0x%x file \"%s\"\n", ce -> ce_fp,
  33115. +          ce -> ce_file ? ce -> ce_file : "");
  33116. +     return OK;
  33117. + }
  33118. + static int  close_encoding (ct)
  33119. + register CT    ct;
  33120. + {
  33121. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33122. +     if (!ce)
  33123. +     return;
  33124. +     if (ce -> ce_fp) {
  33125. +     (void) fclose (ce -> ce_fp);
  33126. +     ce -> ce_fp = NULL;
  33127. +     }
  33128. + }
  33129. + static unsigned long  size_encoding (ct)
  33130. + register CT    ct;
  33131. + {
  33132. +     int        fd;
  33133. +     unsigned long size;
  33134. +     char   *file;
  33135. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33136. +     struct stat st;
  33137. +     if (!ce) {
  33138. + estimate: ;
  33139. +     return (ct -> c_end - ct -> c_begin);
  33140. +     }
  33141. +     if (ce -> ce_fp && fstat (fileno (ce -> ce_fp), &st) != NOTOK)
  33142. +     return st.st_size;
  33143. +     if (ce -> ce_file)
  33144. +     return stat (ce -> ce_file, &st) != NOTOK ? st.st_size : 0L;
  33145. +     if (ct -> c_encoding == CE_EXTERNAL)
  33146. +     goto estimate;
  33147. +     file = NULL;
  33148. +     if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
  33149. +     goto estimate;
  33150. +     size = fstat (fd, &st) != NOTOK ? st.st_size : 0L;
  33151. +     (*ct -> c_ceclosefnx) (ct);
  33152. +     return size;
  33153. + }
  33154. + static int  free_encoding (ct, toplevel)
  33155. + register CT    ct;
  33156. + int    toplevel;
  33157. + {
  33158. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33159. +     if (!ce)
  33160. +     return;
  33161. +     if (ce -> ce_fp) {
  33162. +     (void) fclose (ce -> ce_fp);
  33163. +     ce -> ce_fp = NULL;
  33164. +     }
  33165. +     if (ce -> ce_file) {
  33166. +     if (ce -> ce_unlink)
  33167. +         (void) unlink (ce -> ce_file);
  33168. +     free (ce -> ce_file);
  33169. +     }
  33170. +     if (toplevel) {
  33171. +     free ((char *) ce);
  33172. +     ct -> c_ceparams = NULL;
  33173. +     }
  33174. +     else
  33175. +     ct -> c_ceopenfnx = NULL;
  33176. + }
  33177. + static    init_encoding (ct, openfnx)
  33178. + register CT    ct;
  33179. + int   (*openfnx) ();
  33180. + {
  33181. +     register struct cefile *ce;
  33182. +     if ((ce = (struct cefile *) calloc (1, sizeof *ce)) == NULL)
  33183. +     adios (NULLCP, "out of memory");
  33184. +     ct -> c_ceparams = (caddr_t) ce;
  33185. +     ct -> c_ceopenfnx = openfnx;
  33186. +     ct -> c_ceclosefnx = close_encoding;
  33187. +     ct -> c_cesizefnx = size_encoding;
  33188. +     ct -> c_celistfnx = list_encoding;
  33189. +     ct -> c_cefreefnx = free_encoding;
  33190. +     return OK;
  33191. + }
  33192. + /*     BASE64 */
  33193. + static unsigned char b642nib[0x80] = {
  33194. +     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33195. +     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33196. +     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33197. +     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33198. +     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33199. +     0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f,
  33200. +     0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
  33201. +     0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  33202. +     0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 
  33203. +     0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  33204. +     0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
  33205. +     0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff,
  33206. +     0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 
  33207. +     0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
  33208. +     0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
  33209. +     0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff
  33210. + };
  33211. + static int  openBase64 (ct, file)
  33212. + register CT    ct;
  33213. + char  **file;
  33214. + {
  33215. +     int        bitno,
  33216. +         cc,
  33217. +         fd,
  33218. +         len,
  33219. +         skip;
  33220. +     unsigned long    bits;
  33221. +     register char  *cp,
  33222. +            *ep;
  33223. +     unsigned char   value,
  33224. +            *b = (unsigned char *) &bits,
  33225. +            *b1 = &b[endian > 0 ? 1 : 2],
  33226. +            *b2 = &b[endian > 0 ? 2 : 1],
  33227. +            *b3 = &b[endian > 0 ? 3 : 0];
  33228. +     char    buffer[BUFSIZ];
  33229. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33230. +     if (ce -> ce_fp)
  33231. +     goto ready_to_go;
  33232. +     if (ce -> ce_file) {
  33233. +     if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
  33234. +         content_error (ce -> ce_file, ct, "unable to fopen for reading");
  33235. +         return NOTOK;
  33236. +     }
  33237. +     *file = ce -> ce_file;
  33238. +     return fileno (ce -> ce_fp);
  33239. +     }
  33240. +     ce -> ce_unlink = *file == NULL;
  33241. +     if ((ce -> ce_fp = fopen (ce -> ce_file =
  33242. +                     add (*file ? *file : m_scratch ("", tmp),
  33243. +                      NULLCP),
  33244. +                   "w+")) == NULL) {
  33245. +     content_error (ce -> ce_file, ct,
  33246. +                "unable to fopen for writing and reading");
  33247. +     return NOTOK;
  33248. +     }
  33249. +     if ((len = ct -> c_end - ct -> c_begin) < 0)
  33250. +     adios (NULLCP, "internal error(1)");
  33251. +     if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  33252. +     content_error (ct -> c_file, ct, "unable to open for reading");
  33253. +     return NOTOK;
  33254. +     }
  33255. +     
  33256. +     (void) lseek (fd = fileno (ct -> c_fp), ct -> c_begin, 0);
  33257. +     bitno = 18, bits = 0L, skip = 0;
  33258. +     while (len > 0)
  33259. +     switch (cc = read (fd, buffer, sizeof buffer - 1)) {
  33260. +         case NOTOK:
  33261. +             content_error (ct -> c_file, ct, "error reading from");
  33262. +             goto clean_up;
  33263. +         case OK:
  33264. +         content_error (NULLCP, ct, "premature eof");
  33265. +             goto clean_up;
  33266. +         default:
  33267. +         if (cc > len)
  33268. +             cc = len;
  33269. +         len -= cc;
  33270. +         for (ep = (cp = buffer) + cc; cp < ep; cp++)
  33271. +             switch (*cp) {
  33272. +             default:
  33273. +                 if (isspace (*cp))
  33274. +                 break;
  33275. +                 if (skip
  33276. +                     || (*cp & 0x80)
  33277. +                     || (value = b642nib[*cp & 0x7f]) > 0x3f) {
  33278. +                 if (debugsw)
  33279. +                     fprintf (stderr,
  33280. +                          "*cp=0x%x pos=%ld skip=%d\n", *cp,
  33281. +                          lseek (fd, 0L, 1) - (ep - cp),
  33282. +                          skip);
  33283. +                 content_error (NULLCP, ct,
  33284. +                       "invalid BASE64 encoding -- continuing");
  33285. +                 continue;
  33286. +                 }
  33287. +                 bits |= value << bitno;
  33288. + test_end: ;
  33289. +                 if ((bitno -= 6) < 0) {
  33290. +                 (void) putc ((char) *b1, ce -> ce_fp);
  33291. +                 if (skip < 2) {
  33292. +                     (void) putc ((char) *b2, ce -> ce_fp);
  33293. +                     if (skip < 1)
  33294. +                     (void) putc ((char) *b3, ce -> ce_fp);
  33295. +                 }
  33296. +                 if (ferror (ce -> ce_fp)) {
  33297. +                     content_error (ce -> ce_file, ct,
  33298. +                            "error writing to");
  33299. +                     goto clean_up;
  33300. +                 }
  33301. +                 bitno = 18, bits = 0L, skip = 0;
  33302. +                 }
  33303. +                 break;
  33304. +             case '=':
  33305. +                 if (++skip > 3)
  33306. +                 goto self_delimiting;
  33307. +                 goto test_end;
  33308. +             }
  33309. +     }
  33310. +     if (bitno != 18) {
  33311. +     if (debugsw)
  33312. +         fprintf (stderr, "premature ending (bitno %d)\n", bitno);
  33313. +     content_error (NULLCP, ct, "invalid BASE64 encoding");
  33314. +     goto clean_up;
  33315. +     }
  33316. + self_delimiting: ;
  33317. +     (void) fseek (ct -> c_fp, 0L, 0);
  33318. +     if (fflush (ce -> ce_fp)) {
  33319. +     content_error (ce -> ce_file, ct, "error writing to");
  33320. +     goto clean_up;
  33321. +     }
  33322. + ready_to_go: ;
  33323. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33324. +     *file = ce -> ce_file;
  33325. +     return fileno (ce -> ce_fp);
  33326. + clean_up: ;
  33327. +     free_encoding (ct, 0);
  33328. +     return NOTOK;
  33329. + }
  33330. + static int  InitBase64 (ct)
  33331. + register CT    ct;
  33332. + {
  33333. +     return init_encoding (ct, openBase64);
  33334. + }
  33335. + static int  set_endian ()
  33336. + {
  33337. +     union {
  33338. +     long    l;
  33339. +     char    c[sizeof (long)];
  33340. +     }    un;
  33341. +     un.l = 1;
  33342. +     endian = un.c[0] ? -1 : 1;
  33343. +     if (debugsw)
  33344. +     fprintf (stderr, "%s endian architecture\n",
  33345. +          endian > 0 ? "big" : "little");
  33346. +     mm_charset = getenv ("MM_CHARSET");
  33347. + }
  33348. + /*     QUOTED */
  33349. + static char hex2nib[0x80] = {
  33350. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33351. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33352. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33353. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33354. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33355. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33356. +     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  33357. +     0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33358. +     0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 
  33359. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33360. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33361. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33362. +     0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 
  33363. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33364. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  33365. +     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  33366. + };
  33367. + static int  openQuoted (ct, file)
  33368. + register CT    ct;
  33369. + char  **file;
  33370. + {
  33371. +     int        cc,
  33372. +         len,
  33373. +         quoted;
  33374. +     register char  *cp,
  33375. +            *ep;
  33376. +     char    buffer[BUFSIZ];
  33377. +     unsigned char mask;
  33378. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33379. +     if (ce -> ce_fp)
  33380. +     goto ready_to_go;
  33381. +     if (ce -> ce_file) {
  33382. +     if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
  33383. +         content_error (ce -> ce_file, ct, "unable to fopen for reading");
  33384. +         return NOTOK;
  33385. +     }
  33386. +     *file = ce -> ce_file;
  33387. +     return fileno (ce -> ce_fp);
  33388. +     }
  33389. +     ce -> ce_unlink = *file == NULL;
  33390. +     if ((ce -> ce_fp = fopen (ce -> ce_file =
  33391. +                     add (*file ? *file : m_scratch ("", tmp),
  33392. +                      NULLCP),
  33393. +                   "w+")) == NULL) {
  33394. +     content_error (ce -> ce_file, ct,
  33395. +                "unable to fopen for writing and reading");
  33396. +     return NOTOK;
  33397. +     }
  33398. +     if ((len = ct -> c_end - ct -> c_begin) < 0)
  33399. +     adios (NULLCP, "internal error(2)");
  33400. +     if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  33401. +     content_error (ct -> c_file, ct, "unable to open for reading");
  33402. +     return NOTOK;
  33403. +     }
  33404. +     (void) fseek (ct -> c_fp, ct -> c_begin, 0);
  33405. +     quoted = 0;
  33406. + #ifdef    lint
  33407. +     mask = 0;
  33408. + #endif
  33409. +     while (len > 0) {
  33410. +     char   *dp;
  33411. +     if (fgets (buffer, sizeof buffer - 1, ct -> c_fp) == NULL) {
  33412. +         content_error (NULLCP, ct, "premature eof");
  33413. +         goto clean_up;
  33414. +     }
  33415. +     if ((cc = strlen (buffer)) > len)
  33416. +         cc = len;
  33417. +     len -= cc;
  33418. +     for (ep = (cp = buffer) + cc - 1; cp <= ep; ep--)
  33419. +         if (!isspace (*ep))
  33420. +         break;
  33421. +     *++ep = '\n', ep++;
  33422. +     for (; cp < ep; cp++) {
  33423. +         if (quoted) {
  33424. +         if (quoted > 1) {
  33425. +             if (!isxdigit (*cp)) {
  33426. + invalid_hex: ;
  33427. +             dp = "expecting hexidecimal-digit";
  33428. +             goto invalid_encoding;
  33429. +             }
  33430. +             mask <<= 4;
  33431. +             mask |= hex2nib[*cp & 0x7f];
  33432. +             (void) putc (mask, ce -> ce_fp);
  33433. +         }
  33434. +         else
  33435. +             switch (*cp) {
  33436. +                 case ':':
  33437. +                 (void) putc (*cp, ce -> ce_fp);
  33438. +                 break;
  33439. +             default:
  33440. +                 if (!isxdigit (*cp))
  33441. +                 goto invalid_hex;
  33442. +                 mask = hex2nib[*cp & 0x7f];
  33443. +                 quoted = 2;
  33444. +                 continue;
  33445. +             }
  33446. +         if (ferror (ce -> ce_fp)) {
  33447. +             content_error (ce -> ce_file, ct, "error writing to");
  33448. +             goto clean_up;
  33449. +         }
  33450. +         quoted = 0;
  33451. +         continue;
  33452. +         }
  33453. +         switch (*cp) {
  33454. +             default:
  33455. +             if (*cp < '!' || *cp > '~') {
  33456. +             int    i;
  33457. +             dp = "expecting character in range [!..~]";
  33458. + invalid_encoding: ;
  33459. +             i = strlen (invo_name) + 2;
  33460. +             content_error (NULLCP, ct,
  33461. +                        "invalid QUOTED-PRINTABLE encoding -- %s,\n%*.*sbut got char 0x%x",
  33462. +                        dp, i, i, "", *cp);
  33463. +             goto clean_up;
  33464. +             }
  33465. +             /* and fall...*/
  33466. +         case ' ':
  33467. +         case '\t':
  33468. +         case '\n':
  33469. +             (void) putc (*cp, ce -> ce_fp);
  33470. +             if (ferror (ce -> ce_fp)) {
  33471. +             content_error (ce -> ce_file, ct, "error writing to");
  33472. +             goto clean_up;
  33473. +             }
  33474. +             break;
  33475. +         case '=':
  33476. +             if (*++cp != '\n') {
  33477. +             quoted = 1;
  33478. +             cp--;
  33479. +             }
  33480. +             break;
  33481. +         }
  33482. +     }
  33483. +     }
  33484. +     if (quoted) {
  33485. +     content_error (NULLCP, ct,
  33486. +                "invalid QUOTED-PRINTABLE encoding -- end-of-content while still quoting");
  33487. +     goto clean_up;
  33488. +     }
  33489. +     (void) fseek (ct -> c_fp, 0L, 0);
  33490. +     if (fflush (ce -> ce_fp)) {
  33491. +     content_error (ce -> ce_file, ct, "error writing to");
  33492. +     goto clean_up;
  33493. +     }
  33494. + ready_to_go: ;
  33495. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33496. +     *file = ce -> ce_file;
  33497. +     return fileno (ce -> ce_fp);
  33498. + clean_up: ;
  33499. +     free_encoding (ct, 0);
  33500. +     return NOTOK;
  33501. + }
  33502. + static int  InitQuoted (ct)
  33503. + register CT    ct;
  33504. + {
  33505. +     return init_encoding (ct, openQuoted);
  33506. + }
  33507. + /*     7BIT */
  33508. + static int  open7Bit (ct, file)
  33509. + register CT    ct;
  33510. + char  **file;
  33511. + {
  33512. +     int        cc,
  33513. +         fd,
  33514. +         len;
  33515. +     char    buffer[BUFSIZ];
  33516. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33517. +     if (ce -> ce_fp)
  33518. +     goto ready_to_go;
  33519. +     if (ce -> ce_file) {
  33520. +     if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
  33521. +         content_error (ce -> ce_file, ct, "unable to fopen for reading");
  33522. +         return NOTOK;
  33523. +     }
  33524. +     *file = ce -> ce_file;
  33525. +     return fileno (ce -> ce_fp);
  33526. +     }
  33527. +     ce -> ce_unlink = *file == NULL;
  33528. +     if ((ce -> ce_fp = fopen (ce -> ce_file =
  33529. +                     add (*file ? *file : m_scratch ("", tmp),
  33530. +                      NULLCP),
  33531. +                   "w+")) == NULL) {
  33532. +     content_error (ce -> ce_file, ct,
  33533. +                "unable to fopen for writing and reading");
  33534. +     return NOTOK;
  33535. +     }
  33536. +     if ((len = ct -> c_end - ct -> c_begin) < 0)
  33537. +     adios (NULLCP, "internal error(3)");
  33538. +     if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
  33539. +     content_error (ct -> c_file, ct, "unable to open for reading");
  33540. +     return NOTOK;
  33541. +     }
  33542. +     (void) lseek (fd = fileno (ct -> c_fp), ct -> c_begin, 0);
  33543. +     while (len > 0)
  33544. +     switch (cc = read (fd, buffer, sizeof buffer - 1)) {
  33545. +         case NOTOK:
  33546. +             content_error (ct -> c_file, ct, "error reading from");
  33547. +             goto clean_up;
  33548. +         case OK:
  33549. +         content_error (NULLCP, ct, "premature eof");
  33550. +             goto clean_up;
  33551. +         default:
  33552. +         if (cc > len)
  33553. +             cc = len;
  33554. +         len -= cc;
  33555. +         (void) fwrite (buffer, sizeof *buffer, cc, ce -> ce_fp);
  33556. +         if (ferror (ce -> ce_fp)) {
  33557. +             content_error (ce -> ce_file, ct, "error writing to");
  33558. +             goto clean_up;
  33559. +         }
  33560. +     }
  33561. +     (void) fseek (ct -> c_fp, 0L, 0);
  33562. +     if (fflush (ce -> ce_fp)) {
  33563. +     content_error (ce -> ce_file, ct, "error writing to");
  33564. +     goto clean_up;
  33565. +     }
  33566. + ready_to_go: ;
  33567. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33568. +     *file = ce -> ce_file;
  33569. +     return fileno (ce -> ce_fp);
  33570. + clean_up: ;
  33571. +     free_encoding (ct, 0);
  33572. +     return NOTOK;
  33573. + }
  33574. + static int  Init7Bit (ct)
  33575. + register CT    ct;
  33576. + {
  33577. +     if (init_encoding (ct, open7Bit) == NOTOK)
  33578. +     return NOTOK;
  33579. +     ct -> c_cesizefnx = NULL;
  33580. +     return OK;
  33581. + }
  33582. + /*     External */
  33583. + static int  openExternal (ct, ce, file, fd)
  33584. + register CT    ct;
  33585. + struct cefile *ce;
  33586. + char  **file;
  33587. + int    *fd;
  33588. + {
  33589. +     char   *id;
  33590. +     if (ce -> ce_fp) {
  33591. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33592. + ready_already: ;
  33593. +     *file = ce -> ce_file, *fd = fileno (ce -> ce_fp);
  33594. +     return DONE;
  33595. +     }
  33596. +     if (ce -> ce_file) {
  33597. +     if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
  33598. +         content_error (ce -> ce_file, ct, "unable to fopen for reading");
  33599. +         return NOTOK;
  33600. +     }
  33601. +     goto ready_already;
  33602. +     }
  33603. +     if (xpid) {
  33604. +     (void) pidcheck (pidwait (xpid, NOTOK));
  33605. +     xpid = 0;
  33606. +     }
  33607. +     if (cache && (id = ct -> c_id)) {
  33608. +     char    buffer[BUFSIZ];
  33609. +     (void) sprintf (buffer, "%s/%s", cache, id = trimcpy (id));
  33610. +     free (id);
  33611. +     id = getcpy (buffer);
  33612. +     if (ce -> ce_fp = fopen (id, "r")) {
  33613. +         struct stat    st;
  33614. +         (void) fstat (fileno (ce -> ce_fp), &st);
  33615. +         (void) sprintf (buffer,
  33616. +                 "Use cached copy %s of size %lu octets (content %s)? ",
  33617. +                 id, (unsigned long) st.st_size,
  33618. +                 ct -> c_partno);
  33619. +         if (getanswer (buffer)) {
  33620. +         ce -> ce_unlink = 0;
  33621. +         ce -> ce_file = id;
  33622. +         goto ready_already;
  33623. +         }
  33624. +         (void) fclose (ce -> ce_fp), ce -> ce_fp = NULL;
  33625. +     }
  33626. +     free (id);
  33627. +     }
  33628. +     return OK;
  33629. + }
  33630. + /*     File */
  33631. + static int  openFile (ct, file)
  33632. + register CT    ct;
  33633. + char  **file;
  33634. + {
  33635. +     int        fd;
  33636. +     char   *id;
  33637. +     register struct exbody *e = (struct exbody *) ct -> c_ctextern;
  33638. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33639. +     switch (openExternal (e -> eb_parent, ce, file, &fd)) {
  33640. +     case NOTOK:
  33641. +         return NOTOK;
  33642. +     case OK:
  33643. +         break;
  33644. +     case DONE:
  33645. +         return fd;
  33646. +     }
  33647. +     if (!e -> eb_name) {
  33648. +     content_error (NULLCP, ct, "missing name parameter");
  33649. +     return NOTOK;
  33650. +     }
  33651. +     ce -> ce_unlink = 0;
  33652. +     if ((ce -> ce_fp = fopen (ce -> ce_file = getcpy (e -> eb_name), "r"))
  33653. +         == NULL) {
  33654. +     content_error (ce -> ce_file, ct, "unable to fopen for reading");
  33655. +     return NOTOK;
  33656. +     }
  33657. +     if (cache
  33658. +         && (id = e -> eb_parent -> c_id)
  33659. +         && (!e -> eb_permission
  33660. +             || !uleq (e -> eb_permission, "read-write"))) {
  33661. +     char    buffer[BUFSIZ];
  33662. +     (void) sprintf (buffer, "Make cached, publically-accessible copy of %s? ",
  33663. +             e -> eb_name);
  33664. +     if (getanswer (buffer)) {
  33665. +         int        mask;
  33666. +         char    cachefile[BUFSIZ];
  33667. +         FILE   *fp;
  33668. +         (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
  33669. +         free (id);
  33670. +         mask = umask (0022);
  33671. +         if (fp = fopen (cachefile, "w")) {
  33672. +         register FILE   *gp = ce -> ce_fp;
  33673. +         (void) fseek (gp, 0L, 0);
  33674. +         while (fgets (buffer, sizeof buffer - 1, gp))
  33675. +             (void) fputs (buffer, fp);
  33676. +         (void) fflush (fp);
  33677. +         if (ferror (gp)) {
  33678. +             admonish (ce -> ce_file, "error reading");
  33679. +             (void) unlink (cachefile);
  33680. +         }
  33681. +         if (ferror (fp)) {
  33682. +             admonish (cachefile, "error writing");
  33683. +             (void) unlink (cachefile);
  33684. +         }
  33685. +         (void) fclose (fp);
  33686. +         }
  33687. +         (void) umask (mask);
  33688. +     }
  33689. +     }
  33690. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33691. +     *file = ce -> ce_file;
  33692. +     return fileno (ce -> ce_fp);
  33693. + }
  33694. + /*     FTP */
  33695. + static int  openFTP (ct, file)
  33696. + register CT    ct;
  33697. + char  **file;
  33698. + {
  33699. +     int        caching,
  33700. +         fd;
  33701. +     char   *ftp,
  33702. +            *id,
  33703. +        *user,
  33704. +        *pass,
  33705. +         buffer[BUFSIZ],
  33706. +         cachefile[BUFSIZ];
  33707. +     register struct exbody *e = (struct exbody *) ct -> c_ctextern;
  33708. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33709. +     static char   *username = NULL;
  33710. +     static char   *password = NULL;
  33711. +     (void) sprintf (buffer, "%s-access-ftp", invo_name);
  33712. +     if ((ftp = m_find (buffer)) && !*ftp)
  33713. +     ftp = NULLCP;
  33714. + #ifndef    FTP
  33715. +     if (!ftp)
  33716. +     return NOTOK;
  33717. + #endif
  33718. +     switch (openExternal (e -> eb_parent, ce, file, &fd)) {
  33719. +     case NOTOK:
  33720. +         return NOTOK;
  33721. +     case OK:
  33722. +         break;
  33723. +     case DONE:
  33724. +         return fd;
  33725. +     }
  33726. +     if (!e -> eb_name || !e -> eb_site) {
  33727. +     content_error (NULLCP, ct, "missing %s parameter",
  33728. +                e -> eb_name ? "site": "name");
  33729. +     return NOTOK;
  33730. +     }
  33731. +     (void) sprintf (buffer,
  33732. +             e -> eb_size > 0
  33733. +             ? "Retrieve %s (content %s)\n    using %sFTP from site %s (%lu octets)? "
  33734. +             : "Retrieve %s (content %s)\n    using %sFTP from site %s? ",
  33735. +             e -> eb_name, e -> eb_partno,
  33736. +             e -> eb_flags ? "anonymous " : "",
  33737. +             e -> eb_site, e -> eb_size);
  33738. +     if (!getanswer (buffer))
  33739. +     return NOTOK;
  33740. +     if (e -> eb_flags) {
  33741. +     user = "anonymous";
  33742. +     (void) sprintf (pass = buffer, "%s@%s", getusr (), LocalName ());
  33743. +     }
  33744. +     else {
  33745. +     ruserpass (e -> eb_site, &username, &password);
  33746. +     user = username, pass = password;
  33747. +     }
  33748. +     ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
  33749. +     if (cache
  33750. +         && (id = e -> eb_parent -> c_id)
  33751. +         && (!e -> eb_permission
  33752. +             || !uleq (e -> eb_permission, "read-write"))) {
  33753. +     (void) sprintf (buffer, "Make cached, publically-accessible copy? ");
  33754. +     if (getanswer (buffer)) {
  33755. +         (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
  33756. +         free (id);
  33757. +         if (*file == NULL) {
  33758. +         ce -> ce_unlink = 0;
  33759. +         caching = 1;
  33760. +         }
  33761. +     }
  33762. +     }
  33763. +     if ((ce -> ce_fp = fopen (ce -> ce_file =
  33764. +                     add (*file ? *file
  33765. +                            : caching ? cachefile
  33766. +                            : m_scratch ("", tmp),
  33767. +                      NULLCP),
  33768. +                   "w+")) == NULL) {
  33769. +     content_error (ce -> ce_file, ct,
  33770. +                "unable to fopen for writing and reading");
  33771. +     return NOTOK;
  33772. +     }
  33773. + #ifdef    FTP
  33774. +     if (ftp)
  33775. + #endif
  33776. +     {
  33777. +     int    child_id,
  33778. +         i,
  33779. +         vecp;
  33780. +     char   *vec[9];
  33781. +     vecp = 0;
  33782. +     vec[vecp++] = r1bindex (ftp, '/');
  33783. +     vec[vecp++] = e -> eb_site;
  33784. +     vec[vecp++] = user;
  33785. +     vec[vecp++] = pass;
  33786. +     vec[vecp++] = e -> eb_dir;
  33787. +     vec[vecp++] = e -> eb_name;
  33788. +     vec[vecp++] = ce -> ce_file,
  33789. +     vec[vecp++] = e -> eb_mode && uleq (e -> eb_mode, "ascii")
  33790. +                 ? "ascii" : "binary";
  33791. +     vec[vecp] = NULL;
  33792. +     (void) fflush (stdout);
  33793. +     for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
  33794. +         sleep (5);
  33795. +     switch (child_id) {
  33796. +         case NOTOK:
  33797. +             adios ("fork", "unable to");
  33798. +         /* NOTREACHED */
  33799. +         case OK:
  33800. +         (void) close (fileno (ce -> ce_fp));
  33801. +         (void) execvp (ftp, vec);
  33802. +         fprintf (stderr, "unable to exec ");
  33803. +         perror (ftp);
  33804. +         _exit (-1);
  33805. +         /* NOTREACHED */
  33806. +         default:
  33807. +         if (pidXwait (child_id, NULLCP)) {
  33808. + #ifdef    FTP
  33809. + losing_ftp: ;
  33810. + #endif
  33811. +             username = password = NULL;
  33812. +             ce -> ce_unlink = 1;
  33813. +             return NOTOK;
  33814. +         }
  33815. +         break;
  33816. +     }
  33817. +     }
  33818. + #ifdef    FTP
  33819. +     else
  33820. +     if (ftp_get (e -> eb_site, user, pass, e -> eb_dir, e -> eb_name,
  33821. +              ce -> ce_file,
  33822. +              e -> eb_mode && uleq (e -> eb_mode, "ascii"), 0)
  33823. +             == NOTOK)
  33824. +         goto losing_ftp;
  33825. + #endif
  33826. +     if (cachefile[0])
  33827. +     if (caching)
  33828. +         (void) chmod (cachefile, 0644);
  33829. +     else {
  33830. +         int        mask;
  33831. +         register FILE   *fp;
  33832. +         mask = umask (0022);
  33833. +         if (fp = fopen (cachefile, "w")) {
  33834. +         register FILE   *gp = ce -> ce_fp;
  33835. +         (void) fseek (gp, 0L, 0);
  33836. +         while (fgets (buffer, sizeof buffer - 1, gp))
  33837. +             (void) fputs (buffer, fp);
  33838. +         (void) fflush (fp);
  33839. +         if (ferror (gp)) {
  33840. +             admonish (ce -> ce_file, "error reading");
  33841. +             (void) unlink (cachefile);
  33842. +         }
  33843. +         if (ferror (fp)) {
  33844. +             admonish (cachefile, "error writing");
  33845. +             (void) unlink (cachefile);
  33846. +         }
  33847. +         (void) fclose (fp);
  33848. +         }
  33849. +         (void) umask (mask);
  33850. +     }
  33851. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33852. +     *file = ce -> ce_file;
  33853. +     return fileno (ce -> ce_fp);
  33854. + }
  33855. + /*     Mail */
  33856. + static int  openMail (ct, file)
  33857. + register CT    ct;
  33858. + char  **file;
  33859. + {
  33860. +     int        child_id,
  33861. +         fd,
  33862. +         i,
  33863. +         result,
  33864. +         vecp;
  33865. +     char   *bp,
  33866. +        *id,
  33867. +         buffer[BUFSIZ],
  33868. +        *vec[7];
  33869. +     register struct exbody *e = (struct exbody *) ct -> c_ctextern;
  33870. +     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
  33871. +     switch (openExternal (e -> eb_parent, ce, file, &fd)) {
  33872. +     case NOTOK:
  33873. +         return NOTOK;
  33874. +     case OK:
  33875. +         break;
  33876. +     case DONE:
  33877. +         return fd;
  33878. +     }
  33879. +     if (!e -> eb_server) {
  33880. +     content_error (NULLCP, ct, "missing server parameter");
  33881. +     return NOTOK;
  33882. +     }
  33883. +     bp = concat ("Retrieve content ", e -> eb_partno, " by asking mailbox ",
  33884. +          e -> eb_server, "\n\n", e -> eb_body, "\n? ", NULLCP);
  33885. +     result = getanswer (bp);
  33886. +     free (bp);
  33887. +     if (!result)
  33888. +     return NOTOK;
  33889. +     vecp = 0;
  33890. +     vec[vecp++] = r1bindex (mailproc, '/');
  33891. +     vec[vecp++] = e -> eb_server;
  33892. +     vec[vecp++] = "-subject";
  33893. +     if (cache
  33894. +         && (id = e -> eb_parent -> c_id)
  33895. +         && (!e -> eb_permission
  33896. +             || !uleq (e -> eb_permission, "read-write"))) {
  33897. +     (void) sprintf (buffer, "cache content as %s/%s", cache,
  33898. +             id = trimcpy (id));
  33899. +     free (id);
  33900. +     vec[vecp++] = buffer;
  33901. +     }
  33902. +     else
  33903. +     vec[vecp++] = "mail-server request";
  33904. +     vec[vecp++] = "-body";
  33905. +     vec[vecp++] = e -> eb_body;
  33906. +     vec[vecp] = NULL;
  33907. +     for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
  33908. +     sleep (5);
  33909. +     switch (child_id) {
  33910. +     case NOTOK:
  33911. +         advise ("fork", "unable to");
  33912. +         return NOTOK;
  33913. +     case OK:
  33914. +         (void) execvp (mailproc, vec);
  33915. +         fprintf (stderr, "unable to exec ");
  33916. +         perror (mailproc);
  33917. +         _exit (-1);
  33918. +         /* NOTREACHED */
  33919. +     default:
  33920. +         if (pidXwait (child_id, NULLCP) == OK)
  33921. +         advise (NULLCP, "request sent");
  33922. +         break;
  33923. +     }
  33924. +     ce -> ce_unlink = *file == NULL;
  33925. +     if ((ce -> ce_fp = fopen (ce -> ce_file =
  33926. +                     add (*file ? *file : m_scratch ("", tmp),
  33927. +                      NULLCP),
  33928. +                   "w+")) == NULL) {
  33929. +     content_error (ce -> ce_file, ct,
  33930. +                "unable to fopen for writing and reading");
  33931. +     return NOTOK;
  33932. +     }
  33933. +     if (ct -> c_showproc)
  33934. +     free (ct -> c_showproc);
  33935. +     ct -> c_showproc = add ("true", NULLCP);
  33936. +     (void) fseek (ce -> ce_fp, 0L, 0);
  33937. +     *file = ce -> ce_file;
  33938. +     return fileno (ce -> ce_fp);
  33939. + }
  33940. + /*     COMPOSITION */
  33941. + static    char    prefix[] = "----- =_aaaaaaaaaa";
  33942. + static    char   *free_file = NULL;
  33943. + static    CT    free_ct = NULL;
  33944. + static void  build_comp (file)
  33945. + char   *file;
  33946. + {
  33947. +     int        compnum,
  33948. +         state;
  33949. +     char   *cp,
  33950. +         buf[BUFSIZ],
  33951. +         name[NAMESZ],
  33952. +         tmpfil[BUFSIZ];
  33953. +     struct multipart *m;
  33954. +     register struct part **pp;
  33955. +     CT        ct;
  33956. +     FILE   *in,
  33957. +        *out;
  33958. +     if ((in = fopen (file, "r")) == NULL)
  33959. +     adios (file, "unable to open for reading");
  33960. +     (void) umask (~m_gmprot ());
  33961. +     (void) strcpy (tmpfil, m_scratch (file, invo_name));
  33962. +     if ((out = fopen (tmpfil, "w")) == NULL)
  33963. +     adios (tmpfil, "unable to open for writing");
  33964. +     free_file = tmpfil;
  33965. +     for (compnum = 1, state = FLD;;) {
  33966. +     switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
  33967. +         case FLD:
  33968. +         case FLDPLUS:
  33969. +         case FLDEOF:
  33970. +         compnum++;
  33971. +         if (uleq (name, VRSN_FIELD))
  33972. +             adios (NULLCP, "draft shouldn't contain %s: field",
  33973. +                VRSN_FIELD);
  33974. +         if (uleq (name, TYPE_FIELD)) {
  33975. +             while (state == FLDPLUS)
  33976. +             state = m_getfld (state, name, buf, sizeof buf, in);
  33977. +             goto finish_field;
  33978. +         }
  33979. +         if (uleq (name, ENCODING_FIELD))
  33980. +             adios (NULLCP, "draft shouldn't contain %s: field",
  33981. +                ENCODING_FIELD);
  33982. +         fprintf (out, "%s:%s", name, buf);
  33983. +         while (state == FLDPLUS) {
  33984. +             state = m_getfld (state, name, buf, sizeof buf, in);
  33985. +             (void) fputs (buf, out);
  33986. +         }
  33987. + finish_field: ;
  33988. +         if (state != FLDEOF)
  33989. +             continue;
  33990. +         /* else fall... */
  33991. +         case FILEEOF:
  33992. +         adios (NULLCP, "draft has empty body -- no directives!");
  33993. +         /* NOTREACHED */
  33994. +         case BODY:
  33995. +         case BODYEOF:
  33996. +         (void) fseek (in, (long) (-strlen (buf)), 1);
  33997. +         break;
  33998. +         case LENERR:
  33999. +         case FMTERR:
  34000. +         adios (NULLCP, "message format error in component #%d",
  34001. +                compnum);
  34002. +         default:
  34003. +         adios (NULLCP, "getfld() returned %d", state);
  34004. +     }
  34005. +     break;
  34006. +     }
  34007. +     if ((free_ct = ct = (CT) calloc (1, sizeof *ct)) == NULL)
  34008. +     adios (NULLCP, "out of memory");
  34009. +     if (get_ctinfo ("multipart/mixed", ct, 0) == NOTOK)
  34010. +     done (1);
  34011. +     ct -> c_type = CT_MULTIPART;
  34012. +     ct -> c_subtype = MULTI_MIXED;
  34013. +     ct -> c_ctlistfnx = list_multi;
  34014. +     ct -> c_ctfreefnx = free_multi;
  34015. +     ct -> c_file = add (file, NULLCP);
  34016. +     if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
  34017. +     adios (NULLCP, "out of memory");
  34018. +     ct -> c_ctparams = (caddr_t) m;
  34019. +     pp = &m -> mp_parts;
  34020. +     while (fgetstr (buf, sizeof buf - 1, in)) {
  34021. +     register struct part *part;
  34022. +     CT    p;
  34023. +     if (user_content (in, file, buf, &p) == DONE) {
  34024. +         admonish (NULLCP, "ignoring spurious #end");
  34025. +         continue;
  34026. +     }
  34027. +     if (!p)
  34028. +         continue;
  34029. +     if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
  34030. +         adios (NULLCP, "out of memory");
  34031. +     *pp = part, pp = &part -> mp_next;
  34032. +     part -> mp_part = p;
  34033. +     }
  34034. +     (void) fclose (in);
  34035. +     if (!m -> mp_parts)
  34036. +     adios (NULLCP, "no content directives found");
  34037. +     if (!m -> mp_parts -> mp_next) {
  34038. +     CT    p = m -> mp_parts -> mp_part;
  34039. +     m -> mp_parts -> mp_part = NULL;
  34040. +     free_content (ct);
  34041. +     free_ct = ct = p;
  34042. +     }
  34043. +     if ((cp = index (prefix, 'a')) == NULL)
  34044. +     adios (NULLCP, "internal error(4)");
  34045. +     while (compose_content (ct) == NOTOK)
  34046. +     if (*cp < 'z')
  34047. +         (*cp)++;
  34048. +         else
  34049. +         if (*++cp == 0)
  34050. +         adios (NULLCP,
  34051. +                "giving up trying to find a unique delimiter string");
  34052. +             else
  34053. +         (*cp)++;
  34054. +     fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
  34055. +     (void) output_content (ct, out);
  34056. +     if (fflush (out))
  34057. +     adios (tmpfil, "error writing to");
  34058. +     (void) fclose (out);
  34059. +     if (listsw && ct -> c_ctlistfnx) {
  34060. +     char   *savfile;
  34061. +     if (headsw)
  34062. +         printf (LSTFMT1, "msg", "part", "type/subtype", "size",
  34063. +             "description");
  34064. +                 /* to get msgno */
  34065. +     savfile = ct -> c_file, ct -> c_file = file;
  34066. +     (*ct -> c_ctlistfnx) (ct, 1);
  34067. +     ct -> c_file = savfile;
  34068. +     }
  34069. +     free_content (ct);
  34070. +     free_ct = NULL;
  34071. +     (void) sprintf (buf, "%s.orig", m_backup (file));
  34072. +     if (rename (file, buf) == NOTOK)
  34073. +     adios (buf, "unable to rename %s to", file);
  34074. +     if (rename (tmpfil, file) == NOTOK) {
  34075. +     advise (file, "unable to rename %s to", tmpfil);
  34076. +     (void) rename (buf, file);
  34077. +     done (1);
  34078. +     }
  34079. +     free_file = NULL;
  34080. +     done (0);
  34081. + }
  34082. + /*   */
  34083. + static char *fgetstr (s, n, stream)
  34084. + char   *s;
  34085. + int    n;
  34086. + FILE   *stream;
  34087. + {
  34088. +     register char *cp,
  34089. +           *ep;
  34090. +     for (ep = (cp = s) + n; cp < ep; ) {
  34091. +     register int    i;
  34092. +     if (!fgets (cp, n, stream))
  34093. +         return (cp != s ? s : NULL);
  34094. +     if (cp == s && *cp != '#')
  34095. +         return s;
  34096. +     cp += (i = strlen (cp)) - 1;
  34097. +     if (i <= 1 || *cp-- != '\n' || *cp != '\\')
  34098. +         break;
  34099. +     *cp = 0, n -= (i - 2);
  34100. +     }
  34101. +     return s;
  34102. + }
  34103. + /*   */
  34104. + static int  user_content (in, file, buf, ctp)
  34105. + FILE   *in;
  34106. + char   *file,
  34107. +        *buf;
  34108. + CT     *ctp;
  34109. + {
  34110. +     int        extrnal,
  34111. +         vrsn;
  34112. +     register char  *cp,
  34113. +           **ap;
  34114. +     char    buffer[BUFSIZ];
  34115. +     struct multipart *m;
  34116. +     register struct part **pp;
  34117. +     struct stat st;
  34118. +     register struct str2init *s2i;
  34119. +     register CI        ci;
  34120. +     register CT        ct;
  34121. +     if (buf[0] == '\n' || strcmp (buf, "#\n") == 0) {
  34122. +     *ctp = NULL;
  34123. +     return OK;
  34124. +     }
  34125. +     if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
  34126. +     adios (NULLCP, "out of memory");
  34127. +     *ctp = ct;
  34128. +     ci = &ct -> c_ctinfo;
  34129. +     ct -> c_ctlistfnx = list_content;
  34130. +     if (buf[0] != '#' || buf[1] == '#' || buf[1] == '<') {
  34131. +     int    headers,
  34132. +         inlineD;
  34133. +     long    pos;
  34134. +     char    content[BUFSIZ];
  34135. +     FILE   *out;
  34136. +     ct -> c_file = add (m_tmpfil (invo_name), NULLCP);
  34137. +     ct -> c_unlink = 1;
  34138. +     if ((out = fopen (ct -> c_file, "w")) == NULL)
  34139. +         adios (ct -> c_file, "unable to open for writing");
  34140. +     if (buf[0] == '#' && buf[1] == '<') {
  34141. +         (void) strcpy (content, buf + 2);
  34142. +         inlineD = 1;
  34143. +         goto rock_and_roll;
  34144. +     }
  34145. +     else
  34146. +         inlineD = 0;
  34147. +     (void) strcpy (content, "text/plain");
  34148. +     headers = 0;
  34149. +     (void) strcpy (buffer, buf[0] != '#' ? buf : buf + 1);
  34150. +     for (;;) {
  34151. +         int        i;
  34152. +         if (headers >= 0
  34153. +             && uprf (buffer, DESCR_FIELD)
  34154. +             && buffer[i = strlen (DESCR_FIELD)] == ':') {
  34155. +             headers = 1;
  34156. + again_descr: ;
  34157. +             ct -> c_descr = add (buffer + i + 1, ct -> c_descr);
  34158. +             if (!fgetstr (buffer, sizeof buffer - 1, in))
  34159. +             adios (NULLCP,
  34160. +                    "end-of-file after %s: field in plaintext",
  34161. +                    DESCR_FIELD);
  34162. +             switch (buffer[0]) {
  34163. +                 case ' ':
  34164. +                 case '\t':
  34165. +                 i = -1;
  34166. +                 goto again_descr;
  34167. +             case '#':
  34168. +                 adios (NULLCP,
  34169. +                    "#-directive after %s: field in plaintext",
  34170. +                    DESCR_FIELD);
  34171. +                 /* NOTREACHED */
  34172. +             default:
  34173. +                 break;
  34174. +             }
  34175. +         }
  34176. +         if (headers != 1 || buffer[0] != '\n')
  34177. +         (void) fputs (buffer, out);
  34178. + rock_and_roll: ;
  34179. +         headers = -1;
  34180. +         pos = ftell (in);
  34181. +         if ((cp = fgetstr (buffer, sizeof buffer - 1, in)) == NULL)
  34182. +         break;
  34183. +         if (buffer[0] == '#') {
  34184. +         register char  *bp;
  34185. +         if (buffer[1] != '#')
  34186. +             break;
  34187. +         for (cp = (bp = buffer) + 1; *cp; cp++)
  34188. +             *bp++ = *cp;
  34189. +         *bp = '\0';
  34190. +         }
  34191. +     }
  34192. +     if (listsw)
  34193. +         ct -> c_end = ftell (out);
  34194. +     (void) fclose (out);
  34195. +     if (get_ctinfo (content, ct, inlineD) == NOTOK)
  34196. +         done (1);
  34197. +     for (s2i = str2cts; s2i -> si_key; s2i++)
  34198. +         if (uleq (ci -> ci_type, s2i -> si_key))
  34199. +         break;
  34200. +     if (!s2i -> si_key && !uprf (ci -> ci_type, "X-"))
  34201. +         s2i++;
  34202. +     switch (ct -> c_type = s2i -> si_value) {
  34203. +         case CT_MESSAGE:
  34204. +         case CT_MULTIPART:
  34205. +         adios (NULLCP,
  34206. +                "it makes sense to define a in-line %s content... NOT!",
  34207. +                ct -> c_type == CT_MESSAGE ? "message" : "multipart");
  34208. +         /* NOTREACHED */
  34209. +         default:
  34210. +         if (ct -> c_ctinitfnx = s2i -> si_init)
  34211. +             (void) (*ct -> c_ctinitfnx) (ct);
  34212. +             break;
  34213. +     }
  34214. +     if (cp)
  34215. +         (void) fseek (in, pos, 0);
  34216. +     return OK;
  34217. +     }
  34218. +     extrnal = buf[1] == '@';
  34219. +     if (get_ctinfo (buf + (extrnal ? 2 : 1), ct, 1) == NOTOK)
  34220. +     done (1);
  34221. +     for (s2i = str2cts; s2i -> si_key; s2i++)
  34222. +     if (uleq (ci -> ci_type, s2i -> si_key))
  34223. +         break;
  34224. +     if (s2i -> si_key) {        /* type/subtype [file] */
  34225. +     if (!ci -> ci_subtype)
  34226. +         adios (NULLCP, "missing subtype in \"#%s\"", ci -> ci_type);
  34227. +     switch (ct -> c_type = s2i -> si_value) {
  34228. +         case CT_MULTIPART:
  34229. +             adios (NULLCP, "use \"#begin ... #end\" instead of \"#%s/%s\"",
  34230. +                ci -> ci_type, ci -> ci_subtype);
  34231. +         /* NOTREACHED */
  34232. +         case CT_MESSAGE:
  34233. +         if (uleq (ci -> ci_subtype, "partial"))
  34234. +             adios (NULLCP, "sorry, \"#%s/%s\" isn't supported",
  34235. +                ci -> ci_type, ci -> ci_subtype);
  34236. +         if (uleq (ci -> ci_subtype, "external-body"))
  34237. +             adios (NULLCP, "use \"#@type/subtype ... [] ...\" instead of \"#%s/%s\"",
  34238. +                ci -> ci_type, ci -> ci_subtype);
  34239. +         adios (NULLCP,
  34240. +                "use \"#forw [+folder] [msgs]\" instead of \"#%s/%s\"",
  34241. +                ci -> ci_type, ci -> ci_subtype);
  34242. +         /* NOTREACHED */
  34243. +         default:
  34244. +         if (ct -> c_ctinitfnx = s2i -> si_init)
  34245. +             (void) (*ct -> c_ctinitfnx) (ct);
  34246. +         break;
  34247. +     }
  34248. +     if (extrnal) {
  34249. +         char    msgid[BUFSIZ];
  34250. +         register struct exbody *e;
  34251. +         CT        p;
  34252. +         static int    partno;
  34253. +         static long clock = 0L;
  34254. +         static char *msgfmt;
  34255. +         if (!ci -> ci_magic)
  34256. +         adios (NULLCP, "need external information for \"#@%s/%s\"",
  34257. +                ci -> ci_type, ci -> ci_subtype);
  34258. +         p = ct;
  34259. +         (void) sprintf (buffer, "message/external-body; %s",
  34260. +                 ci -> ci_magic);
  34261. +         free (ci -> ci_magic), ci -> ci_magic = NULL;
  34262. +         if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
  34263. +         adios (NULLCP, "out of memory");
  34264. +         *ctp = ct;
  34265. +         ci = &ct -> c_ctinfo;
  34266. +         ct -> c_ctlistfnx = list_content;
  34267. +         if (get_ctinfo (buffer, ct, 0) == NOTOK)
  34268. +         done (1);
  34269. +         ct -> c_type = CT_MESSAGE;
  34270. +         ct -> c_subtype = MESSAGE_EXTERNAL;
  34271. +         if ((e = (struct exbody *) calloc (1, sizeof *e)) == NULL)
  34272. +         adios (NULLCP, "out of memory");
  34273. +         ct -> c_ctparams = (caddr_t) e;
  34274. +         ct -> c_ctfreefnx = free_external;
  34275. +         e -> eb_parent = ct;
  34276. +         e -> eb_content = p;
  34277. +         p -> c_ctextern = (caddr_t) e;
  34278. +         ct -> c_ctlistfnx = list_external;
  34279. +         if (params_external (ct, 1) == NOTOK)
  34280. +         done (1);
  34281. +         if (clock == 0L) {
  34282. +         (void) time (&clock);
  34283. +         (void) sprintf (msgid, "<%d.%ld.%%d@%s>\n", getpid (), clock,
  34284. +                 LocalName ());
  34285. +         partno = 0;
  34286. +         msgfmt = getcpy (msgid);
  34287. +         }
  34288. +         (void) sprintf (msgid, msgfmt, ++partno);
  34289. +         ct -> c_id = getcpy (msgid);
  34290. +         return OK;
  34291. +     }
  34292. +     if (ci -> ci_magic) {
  34293. +         if (*ci -> ci_magic == '|' || *ci -> ci_magic == '!') {
  34294. +         for (cp = ci -> ci_magic + 1; isspace (*cp); cp++)
  34295. +             continue;
  34296. +         if (!*cp)
  34297. +             adios (NULLCP, "empty pipe command for #%s directive",
  34298. +                ci -> ci_type);
  34299. +         cp = add (cp, NULLCP);
  34300. +         free (ci -> ci_magic);
  34301. +         ci -> ci_magic = cp;
  34302. +         }
  34303. +         else {
  34304. +         if (access (ct -> c_file = ci -> ci_magic, 04) == NOTOK)
  34305. +             adios ("reading", "unable to access %s for", ct -> c_file);
  34306. +         if (listsw && stat (ct -> c_file, &st) != NOTOK)
  34307. +             ct -> c_end = st.st_size;
  34308. +         ci -> ci_magic = NULL;
  34309. +         }
  34310. +         return OK;
  34311. +     }
  34312. +     (void) sprintf (buffer, "%s-compose-%s/%s", invo_name, ci -> ci_type,
  34313. +             ci -> ci_subtype);
  34314. +     if ((cp = m_find (buffer)) == NULL || *cp == 0) {
  34315. +         (void) sprintf (buffer, "%s-compose-%s", invo_name, ci -> ci_type);
  34316. +         if ((cp = m_find (buffer)) == NULL || *cp == 0) {
  34317. +         content_error (NULLCP, ct,
  34318. +                    "don't know how to compose content");
  34319. +         done (1);
  34320. +         }
  34321. +     }
  34322. +     ci -> ci_magic = add (cp, NULLCP);
  34323. +     return OK;
  34324. +     }
  34325. +     if (extrnal)
  34326. +     adios (NULLCP, "externally definition not allowed for \"#%s\"",
  34327. +            ci -> ci_type);
  34328. +     if (uleq (ci -> ci_type, "forw")) {    /* #forw [+folder] [msgs] */
  34329. +     int    msgnum;
  34330. +     char   *folder,
  34331. +            *arguments[MAXARGS];
  34332. +     struct msgs *mp;
  34333. +     if (ci -> ci_magic) {
  34334. +         ap = brkstring (ci -> ci_magic, " ", "\n");
  34335. +         ap = copyip (ap, arguments);
  34336. +     }
  34337. +     else
  34338. +         arguments[0] = "cur", arguments[1] = NULL;
  34339. +     folder = NULL;
  34340. +     for (ap = arguments; cp = *ap; ap++)
  34341. +         if (*cp == '+' || *cp == '@')
  34342. +         if (folder)
  34343. +             adios (NULLCP, "only one folder per #forw directive");
  34344. +         else
  34345. +             folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
  34346. +     if (!folder)
  34347. +         folder = add (m_getfolder (), NULLCP);
  34348. +     if ((mp = m_gmsg (folder)) == NULL)
  34349. +         adios (NULLCP, "unable to read folder %s", folder);
  34350. +     for (ap = arguments; cp = *ap; ap++)
  34351. +         if (*cp != '+' && *cp != '@')
  34352. +         if (!m_convert (mp, cp))
  34353. +             done (1);
  34354. +     free (folder);
  34355. +     free_ctinfo (ct);
  34356. +     if (get_ctinfo ("multipart/digest", ct, 0) == NOTOK)
  34357. +         done (1);
  34358. +     ct -> c_type = CT_MULTIPART;
  34359. +     ct -> c_subtype = MULTI_DIGEST;
  34360. +     ct -> c_ctlistfnx = list_multi;
  34361. +     ct -> c_ctfreefnx = free_multi;
  34362. +     if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
  34363. +         adios (NULLCP, "out of memory");
  34364. +     ct -> c_ctparams = (caddr_t) m;
  34365. +     pp = &m -> mp_parts;
  34366. +     for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
  34367. +         if (mp -> msgstats[msgnum] & SELECTED) {
  34368. +         register struct part *part;
  34369. +         register CT    p;
  34370. +         if ((p = (CT) calloc (1, sizeof *p)) == NULL)
  34371. +             adios (NULLCP, "out of memory");
  34372. +         if (get_ctinfo ("message/rfc822", p, 0) == NOTOK)
  34373. +             done (1);
  34374. +         p -> c_type = CT_MESSAGE;
  34375. +         p -> c_subtype = MESSAGE_RFC822;
  34376. +         p -> c_ctlistfnx = list_content;
  34377. +         (void) sprintf (buffer, "%s/%d", mp -> foldpath, msgnum);
  34378. +         p -> c_file = add (buffer, NULLCP);
  34379. +         if (listsw && stat (p -> c_file, &st) != NOTOK)
  34380. +             p -> c_end = st.st_size;
  34381. +         if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
  34382. +             adios (NULLCP, "out of memory");
  34383. +         *pp = part, pp = &part -> mp_next;
  34384. +         part -> mp_part = p;
  34385. +         }
  34386. +     m_fmsg (mp);
  34387. +     return OK;
  34388. +     }
  34389. +     if (uleq (ci -> ci_type, "end")) {
  34390. +     free_content (ct);
  34391. +     *ctp = NULL;
  34392. +     return DONE;
  34393. +     }
  34394. +     if (!uleq (ci -> ci_type, "begin"))
  34395. +     adios (NULLCP, "unknown directive \"#%s\"", ci -> ci_type);
  34396. +                     /* #begin [ alternative | parallel ] */
  34397. +     vrsn = !ci -> ci_magic ? MULTI_MIXED
  34398. +         : uprf (ci -> ci_magic, "alt") ? MULTI_ALTERNATE
  34399. +                            : MULTI_PARALLEL;
  34400. +     free_ctinfo (ct);
  34401. +     (void) sprintf (buffer, "multipart/%s", SubMultiPart[vrsn - 1].kv_key);
  34402. +     if (get_ctinfo (buffer, ct, 0) == NOTOK)
  34403. +     done (1);
  34404. +     ct -> c_type = CT_MULTIPART;
  34405. +     ct -> c_subtype = vrsn;
  34406. +     ct -> c_ctlistfnx = list_multi;
  34407. +     ct -> c_ctfreefnx = free_multi;
  34408. +     if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
  34409. +     adios (NULLCP, "out of memory");
  34410. +     ct -> c_ctparams = (caddr_t) m;
  34411. +     pp = &m -> mp_parts;
  34412. +     while (fgetstr (buffer, sizeof buffer - 1, in)) {
  34413. +     register struct part *part;
  34414. +     CT    p;
  34415. +     if (user_content (in, file, buffer, &p) == DONE) {
  34416. +         if (!m -> mp_parts)
  34417. +         adios (NULLCP, "empty \"#begin ... #end\" sequence");
  34418. +         return OK;
  34419. +     }
  34420. +     if (!p)
  34421. +         continue;
  34422. +     if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
  34423. +         adios (NULLCP, "out of memory");
  34424. +     *pp = part, pp = &part -> mp_next;
  34425. +     part -> mp_part = p;
  34426. +     }
  34427. +     admonish (NULLCP, "premature end-of-file, missing #end");
  34428. +     return OK;
  34429. + }
  34430. + /*   */
  34431. + static int  compose_content (ct)
  34432. + register CT    ct;
  34433. + {
  34434. +     register char   *cp;
  34435. +     char    buffer[BUFSIZ];
  34436. +     register CI        ci = &ct -> c_ctinfo;
  34437. +     if (ct -> c_type == CT_MESSAGE && ct -> c_subtype == MESSAGE_EXTERNAL)
  34438. +     return OK;
  34439. +     switch (ct -> c_type) {
  34440. +     case CT_MULTIPART:
  34441. +         {
  34442. +         int    partnum;
  34443. +         register char *pp;
  34444. +         char    partnam[BUFSIZ];
  34445. +         struct multipart *m = (struct multipart *) ct -> c_ctparams;
  34446. +         register struct part *part;
  34447. +         if (ct -> c_partno) {
  34448. +             (void) sprintf (partnam, "%s.", ct -> c_partno);
  34449. +             pp = partnam + strlen (partnam);
  34450. +         }
  34451. +         else
  34452. +             pp = partnam;
  34453. +         for (part = m -> mp_parts, partnum = 1;
  34454. +                  part;
  34455. +                  part = part -> mp_next, partnum++) {
  34456. +             register CT  p = part -> mp_part;
  34457. +             (void) sprintf (pp, "%d", partnum);
  34458. +             p -> c_partno = add (partnam, NULLCP);
  34459. +             if (compose_content (p) == NOTOK)
  34460. +             return NOTOK;
  34461. +         }
  34462. +         if (rfc934sw && ct -> c_subtype == MULTI_DIGEST) {
  34463. +             int        is934 = 1;
  34464. +             for (part = m -> mp_parts; part; part = part -> mp_next) {
  34465. +             register CT  p = part -> mp_part;
  34466. +             if (p -> c_subtype != MESSAGE_RFC822) {
  34467. +                 is934 = 0;
  34468. +                 break;
  34469. +             }
  34470. +             }
  34471. +             ct -> c_rfc934 = is934;
  34472. +             for (part = m -> mp_parts; part; part = part -> mp_next) {
  34473. +             register CT  p = part -> mp_part;
  34474. +             if (p -> c_rfc934 = is934)
  34475. +                 p -> c_end++;
  34476. +             }
  34477. +         }
  34478. +         if (listsw) {
  34479. +             ct -> c_end = (partnum = strlen (prefix) + 2) + 2;
  34480. +             if (ct -> c_rfc934)
  34481. +             ct -> c_end += 1;
  34482. +             for (part = m -> mp_parts; part; part = part -> mp_next)
  34483. +             ct -> c_end += part -> mp_part -> c_end + partnum;
  34484. +         }
  34485. +         }
  34486. +         break;
  34487. +     default:
  34488. +         if (!ct -> c_file) {
  34489. +         int    child_id,
  34490. +             i,
  34491. +             xstdout;
  34492. +         register char  *bp,
  34493. +                   **ap;
  34494. +         char   *vec[4];
  34495. +         FILE   *out;
  34496. +         if (!(cp = ci -> ci_magic))
  34497. +             adios (NULLCP, "internal error(5)");
  34498. +         ct -> c_file = add (m_tmpfil (invo_name), NULLCP);
  34499. +         ct -> c_unlink = 1;
  34500. +         xstdout = 0;
  34501. +         buffer[0] = '\0';
  34502. +         for (bp = buffer; *cp; cp++)
  34503. +             if (*cp == '%') {
  34504. +             switch (*++cp) {
  34505. +                     case 'a':    /* additional arguments */
  34506. +                     {
  34507. +                     register char **ep;
  34508. +                     char   *s = "";
  34509. +                     for (ap = ci -> ci_attrs, ep = ci -> ci_values;
  34510. +                          *ap;
  34511. +                          ap++, ep++) {
  34512. +                     (void) sprintf (bp, "%s%s=\"%s\"", s,
  34513. +                             *ap, *ep);
  34514. +                     bp += strlen (bp);
  34515. +                     s = " ";
  34516. +                     }
  34517. +                 }
  34518. +                 break;
  34519. +                 case 'F':    /* %f, and stdout is not-redirected */
  34520. +                 xstdout = 1;
  34521. +                 /* and fall... */
  34522. +                 case 'f':    /* filename */
  34523. +                 (void) sprintf (bp, "%s", ct -> c_file);
  34524. +                 break;
  34525. +                 case 's':    /* subtype */
  34526. +                 (void) strcpy (bp, ci -> ci_subtype);
  34527. +                 break;
  34528. +                 case '%':
  34529. +                 goto raw;
  34530. +                 default:
  34531. +                 *bp++ = *--cp;
  34532. +                 *bp = '\0';
  34533. +                 continue;
  34534. +             }
  34535. +             bp += strlen (bp);
  34536. +             }
  34537. +             else {
  34538. + raw: ;
  34539. +             *bp++ = *cp;
  34540. +             *bp = '\0';
  34541. +             }
  34542. +         printf ("composing content %s/%s from command\n\t%s\n",
  34543. +             ci -> ci_type, ci -> ci_subtype, buffer);
  34544. +         (void) fflush (stdout);
  34545. +         vec[0] = "/bin/sh";
  34546. +         vec[1] = "-c";
  34547. +         vec[2] = buffer;
  34548. +         vec[3] = NULL;
  34549. +         if ((out = fopen (ct -> c_file, "w")) == NULL)
  34550. +             adios (ct -> c_file, "unable to open for writing");
  34551. +         for (i = 0; (child_id = vfork ()) == NOTOK && i > 5; i++)
  34552. +             sleep (5);
  34553. +         switch (child_id) {
  34554. +             case NOTOK:
  34555. +                 adios ("fork", "unable to fork");
  34556. +             /* NOTREACHED */
  34557. +             case OK:
  34558. +             if (!xstdout)
  34559. +                 (void) dup2 (fileno (out), 1);
  34560. +             (void) close (fileno (out));
  34561. +             (void) execvp ("/bin/sh", vec);
  34562. +             fprintf (stderr, "unable to exec ");
  34563. +             perror ("/bin/sh");
  34564. +             _exit (-1);
  34565. +             /* NOTREACHED */
  34566. +            default:
  34567. +             (void) fclose (out);
  34568. +             if (pidXwait (child_id, NULLCP))
  34569. +                 done (1);
  34570. +             break;
  34571. +         }
  34572. +         }
  34573. +         if (listsw && ct -> c_end == 0L) {
  34574. +         struct stat st;
  34575. +         if (stat (ct -> c_file, &st) != NOTOK)
  34576. +             ct -> c_end = st.st_size;
  34577. +         }
  34578. +         if (ct -> c_type != CT_TEXT
  34579. +             && !(ct -> c_type == CT_APPLICATION
  34580. +                  && ct -> c_subtype == APPLICATION_POSTSCRIPT))
  34581. +         break;
  34582. +         /* else fall... */
  34583. +     case CT_MESSAGE:
  34584. +         {
  34585. +         int    charset,
  34586. +             len,
  34587. +             linelen,
  34588. +             result;
  34589. +         FILE   *in;
  34590. +         if ((in = fopen (ct -> c_file, "r")) == NULL)
  34591. +             adios (ct -> c_file, "unable to open for reading");
  34592. +         len = strlen (prefix);
  34593. +         result = OK;
  34594. +         switch (ct -> c_type) {
  34595. +             case CT_TEXT:
  34596. +                 charset = ct -> c_ctparams ? 0 : -1;
  34597. +             linelen = 0;
  34598. +             break;
  34599. +             case CT_APPLICATION:
  34600. +             charset = linelen = ct -> c_encoding ? 0 : -1;
  34601. +             break;
  34602. +             default:
  34603. +             charset = linelen = 0;
  34604. +             break;
  34605. +         }
  34606. +         while (fgets (buffer, sizeof buffer - 1, in)) {
  34607. +             if (charset == -1) {
  34608. +             for (cp = buffer; *cp; cp++)
  34609. +                 if (!isascii (*cp)) {
  34610. +                 charset = CHARSET_UNKNOWN;
  34611. +                 break;
  34612. +                 }
  34613. +             if ((linelen == -1) && (cp - buffer > CPERLIN + 1))
  34614. +                 linelen = 1;
  34615. +             if (result == NOTOK)
  34616. +                 break;
  34617. +             }
  34618. +             else
  34619. +             if ((linelen == -1) && (strlen (buffer) > CPERLIN + 1))
  34620. +                 linelen = 1;
  34621. +             if (result == NOTOK)
  34622. +             continue;
  34623. +             if (buffer[0] == '-' && buffer[1] == '-') {
  34624. +             for (cp = buffer + strlen (buffer) - 1;
  34625. +                      cp >= buffer;
  34626. +                      cp--)
  34627. +                 if (!isspace (*cp))
  34628. +                 break;
  34629. +             *++cp = '\0';
  34630. +             if (strncmp (buffer + 2, prefix, len) == 0
  34631. +                     && isdigit (buffer[2 + len])) {
  34632. +                 result = NOTOK;
  34633. +                 if (charset != -1 && linelen != -1)
  34634. +                 break;
  34635. +             }
  34636. +             }
  34637. +         }
  34638. +         if (ct -> c_type == CT_APPLICATION && !ct -> c_encoding)
  34639. +             ct -> c_encoding = linelen == -1
  34640. +                             && charset != CHARSET_UNKNOWN
  34641. +                         ? CE_7BIT : CE_QUOTED;
  34642. +         if (ct -> c_type == CT_TEXT && !ct -> c_ctparams) {
  34643. +             register char  **ap,
  34644. +                    **ep;
  34645. +             register struct text *t;
  34646. +             if (charset == CHARSET_UNKNOWN && mm_charset)
  34647. +             charset = -2;
  34648. +             else
  34649. +             if (charset == -1)
  34650. +                 charset = CHARSET_USASCII;
  34651. +             if ((t = (struct text *) calloc (1, sizeof *t)) == NULL)
  34652. +             adios (NULLCP, "out of memory");
  34653. +             ct -> c_ctparams = (caddr_t) t;
  34654. +             for (ap = ci -> ci_attrs, ep = ci -> ci_values;
  34655. +                  *ap;
  34656. +                  ap++, ep++)
  34657. +             continue;
  34658. +             switch (t -> tx_charset = charset) {
  34659. +             case CHARSET_USASCII:
  34660. +                 *ap = add ("charset=us-ascii", NULLCP);
  34661. +                 break;
  34662. +             case CHARSET_UNKNOWN:
  34663. +             default:
  34664. +                 *ap = add ("charset=x-unknown", NULLCP);
  34665. +                 break;
  34666. +             case -2:
  34667. +                 *ap = concat ("charset=", mm_charset, NULLCP);
  34668. +                 break;
  34669. +             }
  34670. +             cp = index (*ap++, '=');
  34671. +             *ap = NULL;
  34672. +             *cp++ = '\0';
  34673. +             *ep = cp;
  34674. +         }
  34675. +         (void) fclose (in);
  34676. +         return result;
  34677. +         }
  34678. +     }
  34679. +     return OK;
  34680. + }
  34681. + /*   */
  34682. + static int  output_content (ct, out)
  34683. + register CT    ct;
  34684. + FILE   *out;
  34685. + {
  34686. +     int        cc,
  34687. +         mailbody,
  34688. +         len;
  34689. +     register char   **ap,
  34690. +             **ep;
  34691. +     char    buffer[BUFSIZ];
  34692. +     register CI        ci = &ct -> c_ctinfo;
  34693. +     if (ct -> c_type == CT_MULTIPART) {
  34694. +     register char  *cp;
  34695. +     static    int    encl = 0;
  34696. +     ap = ci -> ci_attrs, ep = ci -> ci_values;
  34697. +     (void) sprintf (buffer, "boundary=%s%d", prefix, encl++);
  34698. +     cp = index (*ap++ = add (buffer, NULLCP), '=');
  34699. +     *ap = NULL;
  34700. +     *cp++ = '\0';
  34701. +     *ep = cp;
  34702. +     }
  34703. +     else
  34704. +     if (ct -> c_type == CT_MESSAGE && ct -> c_rfc934)
  34705. +         goto rfc934_mode;
  34706. +     len = 0;
  34707. +     fprintf (out, "%s: %s/%s", TYPE_FIELD, ci -> ci_type, ci -> ci_subtype);
  34708. +     len += strlen (TYPE_FIELD) + 2 + strlen (ci -> ci_type)
  34709. +                    + 1 + strlen (ci -> ci_subtype);
  34710. +     mailbody = ct -> c_type == CT_MESSAGE
  34711. +         && ct -> c_subtype == MESSAGE_EXTERNAL
  34712. +             && ((struct exbody *) ct -> c_ctparams) -> eb_body;
  34713. +     for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
  34714. +     if (mailbody && uleq (*ap, "body"))
  34715. +         continue;
  34716. +     (void) putc (';', out);
  34717. +     len++;
  34718. +     (void) sprintf (buffer, "%s=\"%s\"", *ap, *ep);
  34719. +     if (len + 1 + (cc = strlen (buffer)) >= CPERLIN) {
  34720. +         (void) fputs ("\n\t", out);
  34721. +         len = 8;
  34722. +     }
  34723. +     else {
  34724. +         (void) putc (' ', out);
  34725. +         len++;
  34726. +     }
  34727. +     fprintf (out, "%s", buffer);
  34728. +     len += cc;
  34729. +     }
  34730. +     if (ci -> ci_comment) {
  34731. +     if (len + 1 + (cc = 2 + strlen (ci -> ci_comment)) >= CPERLIN) {
  34732. +         (void) fputs ("\n\t", out);
  34733. +         len = 8;
  34734. +     }
  34735. +     else {
  34736. +         (void) putc (' ', out);
  34737. +         len++;
  34738. +     }
  34739. +     fprintf (out, "(%s)", ci -> ci_comment);
  34740. +     len += cc;
  34741. +     }
  34742. +     fprintf (out, "\n");
  34743. +     if (ct -> c_id)
  34744. +     fprintf (out, "%s: %s", ID_FIELD, ct -> c_id);
  34745. +     if (ct -> c_descr)
  34746. +     fprintf (out, "%s: %s", DESCR_FIELD, ct -> c_descr);
  34747. + rfc934_mode: ;
  34748. +     if (ct -> c_ctextern)
  34749. +     return OK;
  34750. +     switch (ct -> c_type) {
  34751. +     case CT_MULTIPART:
  34752. +         {
  34753. +         struct multipart *m = (struct multipart *) ct -> c_ctparams;
  34754. +         register struct part *part;
  34755. +         if (ct -> c_rfc934)
  34756. +             fprintf (out, "\n");
  34757. +         for (part = m -> mp_parts; part; part = part -> mp_next) {
  34758. +             register CT  p = part -> mp_part;
  34759. +             fprintf (out, "\n--%s\n", ci -> ci_values[0]);
  34760. +             if (p -> c_type == CT_MESSAGE
  34761. +                 && p -> c_subtype != MESSAGE_EXTERNAL
  34762. +                 && !p -> c_rfc934)
  34763. +             fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
  34764. +             (void) output_content (p, out);
  34765. +         }
  34766. +         fprintf (out, "\n--%s--\n", ci -> ci_values[0]);
  34767. +         }
  34768. +         break;
  34769. +     case CT_TEXT:
  34770. +         if (ct -> c_subtype != TEXT_PLAIN
  34771. +             || (ct -> c_ctparams
  34772. +                 && ((struct text *) ct -> c_ctparams) -> tx_charset
  34773. +                     != CHARSET_USASCII)) {
  34774. + quoted_printable: ;
  34775. +         fprintf (out, "%s: %s\n\n", ENCODING_FIELD,
  34776. +              "quoted-printable");
  34777. +         (void) writeQuoted (ct, out);
  34778. +         break;
  34779. +         }
  34780. +         /* else fall... */
  34781. +     case CT_MESSAGE:
  34782. + seven_bit: ;
  34783. +         fprintf (out, "\n");
  34784. +         if (ct -> c_type == CT_MESSAGE
  34785. +             && ct -> c_subtype == MESSAGE_EXTERNAL) {
  34786. +         register struct exbody *e = (struct exbody *) ct -> c_ctparams;
  34787. +         
  34788. +         (void) output_content (e -> eb_content, out);
  34789. +         if (e -> eb_body)
  34790. +             fprintf (out, "\n%s\n", e -> eb_body);
  34791. +         }
  34792. +         else
  34793. +         (void) write7Bit (ct, out);
  34794. +         break;
  34795. +     case CT_APPLICATION:
  34796. +         if (ct -> c_subtype == APPLICATION_POSTSCRIPT) {
  34797. +         if (ct -> c_encoding == CE_7BIT)
  34798. +             goto seven_bit;
  34799. +         goto quoted_printable;
  34800. +         }
  34801. +         /* else fall... */
  34802. +     default:
  34803. +         fprintf (out, "%s: %s\n\n", ENCODING_FIELD, "base64");
  34804. +         (void) writeBase64 (ct, out);
  34805. +         break;
  34806. +     }
  34807. +     return OK;
  34808. + }
  34809. + /*   */
  34810. + static int  write7Bit (ct, out)
  34811. + register CT    ct;
  34812. + FILE   *out;
  34813. + {
  34814. +     char    c,
  34815. +         buffer[BUFSIZ];
  34816. +     FILE   *in;
  34817. +     if ((in = fopen (ct -> c_file, "r")) == NULL)
  34818. +     adios (ct -> c_file, "unable to open for reading");
  34819. +     c = '\n';
  34820. +     while (fgets (buffer, sizeof buffer - 1, in)) {
  34821. +     c = buffer[strlen (buffer) - 1];
  34822. +     (void) fputs (buffer, out);
  34823. +     }
  34824. +     if (c != '\n')
  34825. +     (void) putc ('\n', out);
  34826. +     (void) fclose (in);
  34827. +     return OK;
  34828. + }
  34829. + /*   */
  34830. + static int  writeQuoted (ct, out)
  34831. + register CT    ct;
  34832. + FILE   *out;
  34833. + {
  34834. +     register char *cp;
  34835. +     char    c,
  34836. +         buffer[BUFSIZ];
  34837. +     FILE   *in;
  34838. +     if ((in = fopen (ct -> c_file, "r")) == NULL)
  34839. +     adios (ct -> c_file, "unable to open for reading");
  34840. +     while (fgets (buffer, sizeof buffer - 1, in)) {
  34841. +     register int    n;
  34842. +     cp = buffer + strlen (buffer) - 1;
  34843. +     if ((c = *cp) == '\n')
  34844. +         *cp = '\0';
  34845. +     if (strncmp (cp = buffer, "From ", sizeof "From " - 1) == 0) {
  34846. +         (void) fprintf (out, "=%02X", *cp++ & 0xff);
  34847. +         n = 3;
  34848. +     }
  34849. +     else
  34850. +         n = 0;
  34851. +     for (; *cp; cp++) {
  34852. +         if (n > CPERLIN - 3) {
  34853. +         (void) fputs ("=\n", out);
  34854. +         n = 0;
  34855. +         }
  34856. +         switch (*cp) {
  34857. +         case ' ':
  34858. +         case '\t':
  34859. +             (void) putc (*cp, out);
  34860. +             n++;
  34861. +             break;
  34862. +         case '@':
  34863. +         case '`':
  34864. +             if (ebcdicsw)
  34865. +             goto three_print;
  34866. + one_print: ;
  34867. +             (void) putc (*cp, out);
  34868. +             n++;
  34869. +             break;
  34870. +         default:
  34871. +             if (('!' <= *cp && *cp <= '$')
  34872. +                 || ('[' <= *cp && *cp <= '^')
  34873. +                 || ('{' <= *cp && *cp <= '~')) {
  34874. +             if (ebcdicsw)
  34875. +                 goto three_print;
  34876. +             goto one_print;
  34877. +             }
  34878. +             if ('%' <= *cp && *cp <= 'z')
  34879. +             goto one_print;
  34880. +             /* else fall... */
  34881. +         case '=':
  34882. + three_print: ;
  34883. +             (void) fprintf (out, "=%02X", *cp & 0xff);
  34884. +             n += 3;
  34885. +             break;
  34886. +         }
  34887. +     }
  34888. +     if (c == '\n') {
  34889. +         if (cp > buffer && (*--cp == ' ' || *cp == '\t'))
  34890. +         (void) fputs ("=\n", out);
  34891. +         (void) putc ('\n', out);
  34892. +     }
  34893. +     else
  34894. +         (void) fputs ("=\n", out);
  34895. +     }
  34896. +     (void) fclose (in);
  34897. +     return OK;
  34898. + }
  34899. + /*   */
  34900. + static char nib2b64[0x40f] =
  34901. +     "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  34902. + static int  writeBase64 (ct, out)
  34903. + register CT    ct;
  34904. + FILE   *out;
  34905. + {
  34906. +     int        result;
  34907. +     FILE   *in;
  34908. +     if ((in = fopen (ct -> c_file, "r")) == NULL)
  34909. +     adios (ct -> c_file, "unable to open for reading");
  34910. +     result = writeBase64aux (in, out);
  34911. +     (void) fclose (in);
  34912. +     return result;
  34913. + }
  34914. + static int  writeBase64aux (in, out)
  34915. + FILE   *in,
  34916. +        *out;
  34917. + {
  34918. +     int        cc,
  34919. +         n;
  34920. +     char    inbuf[3];
  34921. +     n = BPERLIN;
  34922. +     while ((cc = fread (inbuf, sizeof *inbuf, sizeof inbuf, in)) > 0) {
  34923. +     unsigned long bits;
  34924. +     register char *bp;
  34925. +     char    outbuf[4];
  34926. +     if (cc < sizeof inbuf) {
  34927. +         inbuf[2] = 0;
  34928. +         if (cc < sizeof inbuf - 1)
  34929. +         inbuf[1] = 0;
  34930. +     }
  34931. +     bits = (inbuf[0] & 0xff) << 16;
  34932. +     bits |= (inbuf[1] & 0xff) << 8;
  34933. +     bits |= inbuf[2] & 0xff;
  34934. +     for (bp = outbuf + sizeof outbuf; bp > outbuf; bits >>= 6)
  34935. +         *--bp = nib2b64[bits & 0x3f];
  34936. +     if (cc < sizeof inbuf) {
  34937. +         outbuf[3] = '=';
  34938. +         if (cc < sizeof inbuf - 1)
  34939. +         outbuf[2] = '=';
  34940. +     }
  34941. +     (void) fwrite (outbuf, sizeof *outbuf, sizeof outbuf, out);
  34942. +     if (cc < sizeof inbuf) {
  34943. +         (void) putc ('\n', out);
  34944. +         return OK;
  34945. +     }
  34946. +     if (--n <= 0) {
  34947. +         n = BPERLIN;
  34948. +         (void) putc ('\n', out);
  34949. +     }
  34950. +     }
  34951. +     if (n != BPERLIN)
  34952. +     (void) putc ('\n', out);
  34953. +     return OK;
  34954. + }
  34955. + /*     VIAMAIL */
  34956. + #include "../zotnet/tws.h"
  34957. + static int  via_mail (mailsw, subjsw, parmsw, descsw, cmntsw, slowsw, fromsw)
  34958. + char   *mailsw,
  34959. +        *subjsw,
  34960. +        *parmsw,
  34961. +        *descsw,
  34962. +        *cmntsw,
  34963. +        *fromsw;
  34964. + int    slowsw;
  34965. + {
  34966. +     int        nlines,
  34967. +         nparts,
  34968. +         status;
  34969. +     long    pos;
  34970. +     char    tmpfil[BUFSIZ];
  34971. +     struct stat st;
  34972. +     FILE   *fp;
  34973. +     (void) umask (~m_gmprot ());
  34974. +     (void) strcpy (tmpfil, m_tmpfil (invo_name));
  34975. +     if ((fp = fopen (tmpfil, "w+")) == NULL)
  34976. +     adios (tmpfil, "unable to open for writing");
  34977. +     (void) chmod (tmpfil, 0600);
  34978. +     if (!index (mailsw, '@'))
  34979. +     mailsw = concat (mailsw, "@", LocalName (), NULLCP);
  34980. +     fprintf (fp, "To: %s\n", mailsw);
  34981. +     nlines = 1;
  34982. +     if (subjsw)
  34983. +     fprintf (fp, "Subject: %s\n", subjsw), nlines++;
  34984. +     if (fromsw) {
  34985. +     if (!index (fromsw, '@'))
  34986. +         fromsw = concat (fromsw, "@", LocalName (), NULLCP);
  34987. +     fprintf (fp, "From: %s\n", fromsw), nlines++;
  34988. +     }
  34989. +     fprintf (fp, "%s: %s\n", VRSN_FIELD, VRSN_VALUE), nlines++;
  34990. +     fprintf (fp, "%s: application/octet-stream", TYPE_FIELD);
  34991. +     if (parmsw)
  34992. +     fprintf (fp, "; %s", parmsw);
  34993. +     if (cmntsw)
  34994. +     fprintf (fp, "\n\t(%s)", cmntsw), nlines++;
  34995. +     if (descsw)
  34996. +     fprintf (fp, "\n%s: %s", DESCR_FIELD, descsw), nlines++;
  34997. +     fprintf (fp, "\n%s: %s\n\n", ENCODING_FIELD, "base64"), nlines += 2;
  34998. +     if (fflush (fp))
  34999. +     adios (tmpfil, "error writing to");
  35000. +     pos = ftell (fp);
  35001. +     (void) writeBase64aux (stdin, fp);
  35002. +     if (fflush (fp))
  35003. +     adios (tmpfil, "error writing to");
  35004. +     if (fstat (fileno (fp), &st) == NOTOK)
  35005. +     adios ("failed", "fstat of %s", tmpfil);
  35006. +     nlines += ((st.st_size - pos) + CPERLIN) / (CPERLIN + 1);
  35007. +     nparts = (nlines + (LPERMSG - 1)) / LPERMSG;
  35008. +     if (nparts <= 1)
  35009. +     status = via_post (tmpfil);
  35010. +     else {
  35011. +     int    partno;
  35012. +     long    clock;
  35013. +     char    buffer[BUFSIZ],
  35014. +         msgid[BUFSIZ];
  35015. +     
  35016. +     if (verbosw) {
  35017. +         printf ("sending binary image as %d partial messages\n", nparts);
  35018. +         (void) fflush (stdout);
  35019. +     }
  35020. +     (void) time (&clock);
  35021. +     (void) sprintf (msgid, "<%d.%ld@%s>", getpid (), clock, LocalName ());
  35022. +     (void) fseek (fp, 0L, 0);
  35023. +     if (!fgets (buffer, sizeof buffer, fp)
  35024. +             || !fgets (buffer, sizeof buffer, fp)
  35025. +             || (subjsw && !fgets (buffer, sizeof buffer, fp)))
  35026. +         adios (NULLCP, "premature eof");
  35027. +     for (partno = 1; partno <= nparts; partno++) {
  35028. +         int        lineno;
  35029. +         char    tmpdrf[BUFSIZ];
  35030. +         FILE   *out;
  35031. +         (void) strcpy (tmpdrf, m_tmpfil (invo_name));
  35032. +         if ((out = fopen (tmpdrf, "w")) == NULL)
  35033. +         adios (tmpdrf, "unable to open for writing");
  35034. +         (void) chmod (tmpdrf, 0600);
  35035. +         fprintf (out, "To: %s\n", mailsw);
  35036. +         if (subjsw)
  35037. +         fprintf (out, "Subject: %s\n", subjsw);
  35038. +         fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
  35039. +         fprintf (out,
  35040. +              "%s: message/partial; id=\"%s\";\n\tnumber=%d; total=%d\n",
  35041. +              TYPE_FIELD, msgid, partno, nparts);
  35042. +         fprintf (out, "%s: part %d of %d\n\n", DESCR_FIELD, partno,
  35043. +              nparts);
  35044. +         if (partno == 1)
  35045. +         fprintf (out, "Message-ID: %s\n", msgid);
  35046. +         for (lineno = LPERMSG; lineno > 0; lineno--) {
  35047. +         if (!fgets (buffer, sizeof buffer, fp)) {
  35048. +             if (partno == nparts)
  35049. +             break;
  35050. +             adios (NULLCP, "premature eof");
  35051. +         }
  35052. +         (void) fputs (buffer, out);
  35053. +         }
  35054. +         if (fflush (out))
  35055. +         adios (tmpdrf, "error writing to");
  35056. +         (void) fclose (out);
  35057. +         if (slowsw > 0 && 1 < partno && partno < nparts) {
  35058. +         if (verbosw) {
  35059. +             printf ("pausing %d seconds before sending part %d...\n",
  35060. +                 slowsw, partno);
  35061. +             (void) fflush (stdout);
  35062. +         }
  35063. +         sleep ((unsigned) slowsw);
  35064. +         }
  35065. +         status = via_post (tmpdrf);
  35066. +         (void) unlink (tmpdrf);
  35067. +         if (status)
  35068. +         break;
  35069. +     }
  35070. +     }
  35071. +     (void) fclose (fp);
  35072. +     (void) unlink (tmpfil);
  35073. +     done (status ? 1 : 0);
  35074. + }
  35075. + /*   */
  35076. + static int  via_post (file)
  35077. + char   *file;
  35078. + {
  35079. +     int        child_id,
  35080. +         i;
  35081. +     for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++)
  35082. +     sleep (5);
  35083. +     switch (child_id) {
  35084. +         case NOTOK:
  35085. +         adios ("fork", "unable to");
  35086. +         /* NOTREACHED */
  35087. +     case OK:
  35088. +         (void) execlp (postproc, r1bindex (postproc, '/'), file, NULLCP);
  35089. +         fprintf (stderr, "unable to exec ");
  35090. +         perror (postproc);
  35091. +         _exit (-1);
  35092. +         /* NOTREACHED */
  35093. +     default:
  35094. +         return pidXwait (child_id, postproc);
  35095. +     }
  35096. + }
  35097. + /*   */
  35098. + void done (status)
  35099. + int    status;
  35100. + {
  35101. +     register CT       *ctp;
  35102. +     if (ctp = cts)
  35103. +     for (; *ctp; ctp++)
  35104. +         free_content (*ctp);
  35105. +     if (free_ct)
  35106. +     free_content (free_ct);
  35107. +     if (free_file)
  35108. +     (void) unlink (free_file);
  35109. +     exit (status);
  35110. + }
  35111. + static int  pidcheck (status)
  35112. + int    status;
  35113. + {
  35114. +     if ((status & 0xff00) == 0xff00 || (status & 0x007f) != SIGQUIT)
  35115. +     return status;
  35116. +     (void) unlink ("core");
  35117. +     (void) fflush (stdout);
  35118. +     (void) fflush (stderr);
  35119. +     done (1);
  35120. +     /* NOTREACHED */
  35121. + }
  35122. *** /dev/null    Tue Dec 15 08:01:10 1992
  35123. --- uip/mhparam.c    Mon Dec 14 16:21:20 1992
  35124. ***************
  35125. *** 0 ****
  35126. --- 1,167 ----
  35127. + /* mhparam.c - print mh_profile values */
  35128. + #ifndef    lint
  35129. + static char ident[] = "@(#)$Id: mhparam.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
  35130. + #endif    /* lint */
  35131. + /* contributed by Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu> */
  35132. + #include "../h/mh.h"
  35133. + #include <stdio.h>
  35134. + /*   */
  35135. + static struct swit switches[] = {
  35136. + #define    COMPSW    0
  35137. +     "components", 0,
  35138. + #define    NCOMPSW    1
  35139. +     "nocomponents", 0,
  35140. + #define    ALLSW    2
  35141. +     "all", 0,
  35142. + #define    HELPSW    3
  35143. +     "help", 4,
  35144. +     NULL, 0
  35145. + };
  35146. + static char *p_find();
  35147. + /*   */
  35148. + /* ARGSUSED */
  35149. + main(argc, argv)
  35150. +     int argc;
  35151. +     char *argv[];
  35152. + {
  35153. +     int     i,
  35154. +             all = 0,
  35155. +             compp = 0,
  35156. +             components = -1,
  35157. +             missed = 0;
  35158. +     char   *cp,
  35159. +             buf[100],
  35160. +           **ap,
  35161. +           **argp,
  35162. +            *arguments[MAXARGS],
  35163. +            *comps[MAXARGS];
  35164. +     invo_name = r1bindex (argv[0], '/');
  35165. +     if ((cp = m_find (invo_name)) != NULL) {
  35166. +     ap = brkstring (cp = getcpy (cp), " ", "\n");
  35167. +     ap = copyip (ap, arguments);
  35168. +     }
  35169. +     else
  35170. +     ap = arguments;
  35171. +     (void) copyip (argv + 1, ap);
  35172. +     argp = arguments;
  35173. + /*   */
  35174. +     while (cp = *argp++) {
  35175. +     if (*cp == '-')
  35176. +         switch (smatch (++cp, switches)) {
  35177. +         case AMBIGSW: 
  35178. +             ambigsw (cp, switches);
  35179. +             done (1);
  35180. +         case UNKWNSW: 
  35181. +             adios (NULLCP, "-%s unknown", cp);
  35182. +         case HELPSW: 
  35183. +             (void) sprintf (buf, "%s [profile-components] [switches]",
  35184. +                 invo_name);
  35185. +             help (buf, switches);
  35186. +             done (1);
  35187. +         case COMPSW:
  35188. +             components = 1;
  35189. +             break;
  35190. +         case NCOMPSW:
  35191. +             components = 0;
  35192. +             break;
  35193. +         case ALLSW:
  35194. +             all = 1;
  35195. +             break;
  35196. +         }
  35197. +     else 
  35198. +         comps[compp++] = cp;
  35199. +     }
  35200. + /*   */
  35201. +     if (all) {
  35202. +         register struct node   *np;
  35203. +     if (compp)
  35204. +         advise(NULLCP, "profile-components ignored with -all");
  35205. +     if (components >= 0)
  35206. +         advise(NULLCP, "-%scomponents ignored with -all",
  35207. +            components ? "" : "no");
  35208. +       
  35209. +     m_getdefs ();
  35210. +     for (np = m_defs; np; np = np -> n_next)
  35211. +         printf("%s:\t%s\n", np -> n_name, np -> n_field);
  35212. +     } else {
  35213. +         if (components < 0)
  35214. +         components = compp > 1;
  35215. +     for (i = 0; i < compp; i++)  {
  35216. +         register char *value = m_find(comps[i]);
  35217. +         if (!value)
  35218. +         value = p_find(comps[i]);
  35219. +         if (value) {
  35220. +             if (components)
  35221. +             printf("%s:\t", comps[i]);
  35222. +         printf("%s\n", value);
  35223. +         } else
  35224. +             missed++;
  35225. +     }
  35226. +     }
  35227. +     
  35228. +     done (missed);
  35229. + }
  35230. + static struct procs {
  35231. +     char    *p_name;
  35232. +     char    **p_field;
  35233. + } procs [] = {
  35234. +      { "context",    &context    },
  35235. +      { "faceproc",    &faceproc    },
  35236. +      { "fileproc",    &fileproc    },
  35237. +      { "foldprot",    &foldprot    },
  35238. +      { "incproc",    &incproc    },
  35239. +      { "installproc",    &installproc     },
  35240. +      { "lproc",       &lproc        },
  35241. +      { "mailproc",    &mailproc    },
  35242. +      { "mhlproc",    &mhlproc    },
  35243. +      { "moreproc",    &moreproc    },
  35244. +      { "msgprot",    &msgprot    },
  35245. +      { "mshproc",    &mshproc    },
  35246. +      { "packproc",    &packproc    },
  35247. +      { "postproc",    &postproc    },
  35248. +      { "rmfproc",    &rmfproc    },
  35249. +      { "rmmproc",    &rmmproc    },
  35250. +      { "sendproc",    &sendproc    },
  35251. +      { "showproc",    &showproc    },
  35252. +      { "slocalproc",    &slocalproc    },
  35253. +      { "version",    &version    },
  35254. +      { "vmhproc",    &vmhproc    },
  35255. +      { "whatnowproc",    &whatnowproc    },
  35256. +      { "whomproc",    &whomproc    },
  35257. +      { NULL, NULL },
  35258. + };
  35259. + static char *p_find(str)
  35260. + register char *str;
  35261. + {
  35262. +     register struct procs *ps;
  35263. +     for (ps = procs; ps->p_name; ps++)
  35264. +     if (uleq (ps -> p_name, str))
  35265. +         return (*ps -> p_field);
  35266. +     return NULL;
  35267. + }
  35268. *** ../mh-6.7.2/uip/mhpath.c    Thu Oct 29 15:02:27 1987
  35269. --- uip/mhpath.c    Mon Dec 14 16:21:21 1992
  35270. ***************
  35271. *** 1,7 ****
  35272. --- 1,13 ----
  35273.   /* mhpath.c - print full pathnames */
  35274. + #ifndef    lint
  35275. + static char ident[] = "@(#)$Id: mhpath.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  35276. + #endif    /* lint */
  35277.   
  35278.   #include "../h/mh.h"
  35279.   #include <stdio.h>
  35280. + #ifdef LOCALE
  35281. + #include    <locale.h>
  35282. + #endif
  35283.   
  35284.   /*   */
  35285.   
  35286. ***************
  35287. *** 9,15 ****
  35288.   #define    HELPSW    0
  35289.       "help", 4,
  35290.   
  35291. !     NULL, NULL
  35292.   };
  35293.   
  35294.   /*   */
  35295. --- 15,21 ----
  35296.   #define    HELPSW    0
  35297.       "help", 4,
  35298.   
  35299. !     NULL, 0
  35300.   };
  35301.   
  35302.   /*   */
  35303. ***************
  35304. *** 32,37 ****
  35305. --- 38,46 ----
  35306.              *msgs[MAXARGS];
  35307.       struct msgs *mp;
  35308.   
  35309. + #ifdef LOCALE
  35310. +     setlocale(LC_ALL, "");
  35311. + #endif
  35312.       invo_name = r1bindex (argv[0], '/');
  35313.       if ((cp = m_find (invo_name)) != NULL) {
  35314.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  35315. *** ../mh-6.7.2/uip/msgchk.c    Thu Apr  5 16:03:44 1990
  35316. --- uip/msgchk.c    Mon Dec 14 16:21:21 1992
  35317. ***************
  35318. *** 1,7 ****
  35319.   /* msgchk.c - check for mail */
  35320.   #ifndef    lint
  35321. ! static char ident[] = "@(#)$Id: msgchk.c,v 1.3 90/04/05 15:01:32 sources Exp $";
  35322. ! #endif    lint
  35323.   
  35324.   #include "../h/mh.h"
  35325.   #include <stdio.h>
  35326. --- 1,7 ----
  35327.   /* msgchk.c - check for mail */
  35328.   #ifndef    lint
  35329. ! static char ident[] = "@(#)$Id: msgchk.c,v 1.11 1992/12/15 00:20:22 jromine Exp $";
  35330. ! #endif    /* lint */
  35331.   
  35332.   #include "../h/mh.h"
  35333.   #include <stdio.h>
  35334. ***************
  35335. *** 10,30 ****
  35336.   #include <sys/types.h>
  35337.   #include <sys/stat.h>
  35338.   #include <pwd.h>
  35339.   
  35340.   /*   */
  35341.   
  35342.   #ifndef    POP
  35343.   #define    POPminc(a)    (a)
  35344. ! #else    POP
  35345.   #define    POPminc(a)    0
  35346. ! #endif    POP
  35347.   
  35348.   #ifndef    RPOP
  35349.   #define    RPOPminc(a)    (a)
  35350. ! #else    RPOP
  35351.   #define    RPOPminc(a)    0
  35352. ! #endif    RPOP
  35353.   
  35354.   static struct swit  switches[] = {
  35355.   #define    DATESW    0
  35356.       "date", 0,
  35357. --- 10,42 ----
  35358.   #include <sys/types.h>
  35359.   #include <sys/stat.h>
  35360.   #include <pwd.h>
  35361. + #ifdef LOCALE
  35362. + #include <locale.h>
  35363. + #endif
  35364. + #ifdef HESIOD
  35365. + #include <hesiod.h>
  35366. + #endif
  35367.   
  35368.   /*   */
  35369.   
  35370.   #ifndef    POP
  35371.   #define    POPminc(a)    (a)
  35372. ! #else    /* POP */
  35373.   #define    POPminc(a)    0
  35374. ! #endif    /* POP */
  35375.   
  35376.   #ifndef    RPOP
  35377.   #define    RPOPminc(a)    (a)
  35378. ! #else    /* RPOP */
  35379.   #define    RPOPminc(a)    0
  35380. ! #endif    /* RPOP */
  35381.   
  35382. + #ifndef    APOP
  35383. + #define    APOPminc(a)    (a)
  35384. + #else
  35385. + #define    APOPminc(a)    0
  35386. + #endif
  35387.   static struct swit  switches[] = {
  35388.   #define    DATESW    0
  35389.       "date", 0,
  35390. ***************
  35391. *** 41,55 ****
  35392.   #define    USERSW    5
  35393.       "user user", POPminc (-4),
  35394.   
  35395. ! #define    RPOPSW    6
  35396.       "rpop", RPOPminc (-4),
  35397. ! #define    NRPOPSW    7
  35398.       "norpop", RPOPminc (-6),
  35399.   
  35400. ! #define    HELPSW    8
  35401.       "help", 4,
  35402.   
  35403. !     NULL, NULL
  35404.   };
  35405.   
  35406.   /*   */
  35407. --- 53,72 ----
  35408.   #define    USERSW    5
  35409.       "user user", POPminc (-4),
  35410.   
  35411. ! #define    APOPSW    6
  35412. !     "apop", APOPminc (-4),
  35413. ! #define    NAPOPSW    7
  35414. !     "noapop", APOPminc (-6),
  35415. ! #define    RPOPSW    8
  35416.       "rpop", RPOPminc (-4),
  35417. ! #define    NRPOPSW    9
  35418.       "norpop", RPOPminc (-6),
  35419.   
  35420. ! #define    HELPSW    10
  35421.       "help", 4,
  35422.   
  35423. !     NULL, 0
  35424.   };
  35425.   
  35426.   /*   */
  35427. ***************
  35428. *** 70,77 ****
  35429.   
  35430.   
  35431.   #ifdef    SYS5
  35432.   struct passwd    *getpwuid(), *getpwnam();
  35433. ! #endif    SYS5
  35434.   
  35435.   static int    donote(), checkmail(), remotemail();
  35436.   /*   */
  35437. --- 87,96 ----
  35438.   
  35439.   
  35440.   #ifdef    SYS5
  35441. + #ifndef __STDC__
  35442.   struct passwd    *getpwuid(), *getpwnam();
  35443. ! #endif /* !__STDC__ */
  35444. ! #endif    /* SYS5 */
  35445.   
  35446.   static int    donote(), checkmail(), remotemail();
  35447.   /*   */
  35448. ***************
  35449. *** 88,93 ****
  35450. --- 107,113 ----
  35451.           status = 0,
  35452.           snoop = 0,
  35453.           vecp = 0;
  35454. +     int uid = getuid ();
  35455.       char   *cp,
  35456.              *host = NULL,
  35457.               buf[80],
  35458. ***************
  35459. *** 95,110 ****
  35460.             **argp,
  35461.          *arguments[MAXARGS],
  35462.              *vec[50];
  35463.       struct passwd  *pw;
  35464.   
  35465.       invo_name = r1bindex (argv[0], '/');
  35466.       mts_init (invo_name);
  35467.   #ifdef    POP
  35468. -     if (pophost && *pophost)
  35469. -     host = pophost;
  35470.       if ((cp = getenv ("MHPOPDEBUG")) && *cp)
  35471.       snoop++;
  35472. ! #endif    POP
  35473.       if ((cp = m_find (invo_name)) != NULL) {
  35474.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  35475.       ap = copyip (ap, arguments);
  35476. --- 115,137 ----
  35477.             **argp,
  35478.          *arguments[MAXARGS],
  35479.              *vec[50];
  35480. +     char *user = getusr ();
  35481.       struct passwd  *pw;
  35482. + #ifdef HESIOD
  35483. +     struct hes_postoffice *po;
  35484. +     char *tmphost;
  35485. + #endif
  35486.   
  35487. + #ifdef LOCALE
  35488. +     setlocale(LC_ALL, "");
  35489. + #endif
  35490.       invo_name = r1bindex (argv[0], '/');
  35491.       mts_init (invo_name);
  35492.   #ifdef    POP
  35493.       if ((cp = getenv ("MHPOPDEBUG")) && *cp)
  35494.       snoop++;
  35495. ! #endif
  35496.       if ((cp = m_find (invo_name)) != NULL) {
  35497.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  35498.       ap = copyip (ap, arguments);
  35499. ***************
  35500. *** 157,165 ****
  35501.               adios (NULLCP, "missing argument to %s", argp[-2]);
  35502.               vec[vecp++] = cp;
  35503.               continue;
  35504.           case RPOPSW: 
  35505. !             rpop++;
  35506.               continue;
  35507.           case NRPOPSW: 
  35508.               rpop = 0;
  35509.               continue;
  35510. --- 184,196 ----
  35511.               adios (NULLCP, "missing argument to %s", argp[-2]);
  35512.               vec[vecp++] = cp;
  35513.               continue;
  35514. +         case APOPSW: 
  35515. +             rpop = -1;
  35516. +             continue;
  35517.           case RPOPSW: 
  35518. !             rpop = 1;
  35519.               continue;
  35520. +         case NAPOPSW:
  35521.           case NRPOPSW: 
  35522.               rpop = 0;
  35523.               continue;
  35524. ***************
  35525. *** 168,190 ****
  35526.       }
  35527.   
  35528.   /*   */
  35529.   #ifdef    POP
  35530.       if (!host || !*host)
  35531.       host = NULL;
  35532. !     if (!host || !rpop)
  35533. !     (void) setuid (getuid ());
  35534. ! #endif    POP
  35535.       if (vecp == 0) {
  35536.   #ifdef    POP
  35537.       if (host)
  35538. !         status = remotemail (host, NULLCP, rpop, notifysw, 1, snoop);
  35539.       else
  35540. ! #endif    POP
  35541. !         if ((pw = getpwuid (getuid ())) == NULL)
  35542. !         adios (NULLCP, "you lose");
  35543. !         else
  35544. !         status = checkmail (pw, datesw, notifysw, 1);
  35545.       }
  35546.       else {
  35547.       vec[vecp] = NULL;
  35548. --- 199,247 ----
  35549.       }
  35550.   
  35551.   /*   */
  35552.   #ifdef    POP
  35553. + #ifdef HESIOD
  35554. +     /*
  35555. +       * Scheme is:
  35556. +       *        use MAILHOST environment variable if present,
  35557. +       *  else try Hesiod.
  35558. +       *  If that fails, use the default (if any)
  35559. +       *  provided by mtstailor in mts_init()
  35560. +       */
  35561. +     if (pophost == NULL || pophost[0] == '\0')
  35562. +       {
  35563. +     if ((tmphost = getenv("MAILHOST")) != NULL)
  35564. +       pophost = tmphost;
  35565. +     else if ((po = hes_getmailhost(vecp ? vec[0] : user)) != NULL &&
  35566. +          strcmp(po->po_type, "POP") == 0)
  35567. +       pophost = po->po_host;
  35568. +       }
  35569. + #endif /* HESIOD */
  35570. +     if (pophost && *pophost)
  35571. +     host = pophost;
  35572.       if (!host || !*host)
  35573.       host = NULL;
  35574. !     if (!host || rpop <= 0)
  35575. !     (void) setuid (uid);
  35576. ! #endif /* POP */
  35577.       if (vecp == 0) {
  35578.   #ifdef    POP
  35579.       if (host)
  35580. !         status = remotemail (host, user, rpop, notifysw, 1, snoop);
  35581.       else
  35582. ! #endif
  35583. !       {
  35584. !         char *home = (uid = geteuid()) ? home = getenv ("HOME") : NULL;
  35585. !         if (home == NULL)
  35586. !           {
  35587. !         pw = getpwnam (user);
  35588. !         if (pw == NULL)
  35589. !           adios (NULLCP, "unable to get information about user");
  35590. !         if (home == NULL)
  35591. !           home = pw->pw_dir;
  35592. !           }
  35593. !         status = checkmail (user, home, datesw, notifysw, 1);
  35594. !       }
  35595.       }
  35596.       else {
  35597.       vec[vecp] = NULL;
  35598. ***************
  35599. *** 194,202 ****
  35600.           if (host)
  35601.           status += remotemail (host, cp, rpop, notifysw, 0, snoop);
  35602.           else
  35603. ! #endif    POP
  35604.           if (pw = getpwnam (cp))
  35605. !             status += checkmail (pw, datesw, notifysw, 0);
  35606.           else
  35607.               advise (NULLCP, "no such user as %s", cp);
  35608.       }
  35609. --- 251,259 ----
  35610.           if (host)
  35611.           status += remotemail (host, cp, rpop, notifysw, 0, snoop);
  35612.           else
  35613. ! #endif
  35614.           if (pw = getpwnam (cp))
  35615. !             status += checkmail (pw->pw_name, pw->pw_dir, datesw, notifysw, 0);
  35616.           else
  35617.               advise (NULLCP, "no such user as %s", cp);
  35618.       }
  35619. ***************
  35620. *** 214,220 ****
  35621.   #define    NNMAISW    2
  35622.       "nomail", 0,
  35623.   
  35624. !     NULL, NULL
  35625.   };
  35626.   
  35627.   
  35628. --- 271,277 ----
  35629.   #define    NNMAISW    2
  35630.       "nomail", 0,
  35631.   
  35632. !     NULL, 0
  35633.   };
  35634.   
  35635.   
  35636. ***************
  35637. *** 242,251 ****
  35638.   
  35639.   #ifdef    MF
  35640.   /* ARGSUSED */
  35641. ! #endif    MF
  35642.   
  35643. ! static int  checkmail (pw, datesw, notifysw, personal)
  35644. ! register struct passwd  *pw;
  35645.   int    datesw,
  35646.       notifysw,
  35647.       personal;
  35648. --- 299,308 ----
  35649.   
  35650.   #ifdef    MF
  35651.   /* ARGSUSED */
  35652. ! #endif    /* MF */
  35653.   
  35654. ! static int  checkmail (user, home, datesw, notifysw, personal)
  35655. ! register char *user, *home;
  35656.   int    datesw,
  35657.       notifysw,
  35658.       personal;
  35659. ***************
  35660. *** 256,269 ****
  35661.       struct stat st;
  35662.   
  35663.       (void) sprintf (buffer, "%s/%s",
  35664. !         mmdfldir[0] ? mmdfldir : pw -> pw_dir,
  35665. !         mmdflfil[0] ? mmdflfil : pw -> pw_name);
  35666.   #ifndef    MF
  35667.       if (datesw) {
  35668.       st.st_size = 0;
  35669.       st.st_atime = st.st_mtime = 0;
  35670.       }
  35671. ! #endif    MF
  35672.       mf = (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
  35673.       : st.st_atime <= st.st_mtime ? MMDFNEW : MMDFOLD;
  35674.   
  35675. --- 313,326 ----
  35676.       struct stat st;
  35677.   
  35678.       (void) sprintf (buffer, "%s/%s",
  35679. !         mmdfldir[0] ? mmdfldir : home,
  35680. !         mmdflfil[0] ? mmdflfil : user);
  35681.   #ifndef    MF
  35682.       if (datesw) {
  35683.       st.st_size = 0;
  35684.       st.st_atime = st.st_mtime = 0;
  35685.       }
  35686. ! #endif    /* MF */
  35687.       mf = (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
  35688.       : st.st_atime <= st.st_mtime ? MMDFNEW : MMDFOLD;
  35689.   
  35690. ***************
  35691. *** 270,285 ****
  35692.   #ifdef    MF
  35693.       if (umincproc != NULL && *umincproc != NULL) {
  35694.       (void) sprintf (buffer, "%s/%s",
  35695. !         uucpldir[0] ? uucpldir : pw -> pw_dir,
  35696. !         uucplfil[0] ? uucplfil : pw -> pw_name);
  35697.       mf |= (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
  35698.           : st.st_atime <= st.st_mtime ? UUCPNEW : UUCPOLD;
  35699.       }
  35700. ! #endif    MF
  35701.   
  35702.       if ((mf & UUCPOK) || (mf & MMDFOK)) {
  35703.       if (notifysw & NT_MAIL) {
  35704. !         printf (personal ? "You have " : "%s has ", pw -> pw_name);
  35705.           if (mf & UUCPOK)
  35706.           printf ("%s old-style bell", mf & UUCPOLD ? "old" : "new");
  35707.           if ((mf & UUCPOK) && (mf & MMDFOK))
  35708. --- 327,342 ----
  35709.   #ifdef    MF
  35710.       if (umincproc != NULL && *umincproc != NULL) {
  35711.       (void) sprintf (buffer, "%s/%s",
  35712. !         uucpldir[0] ? uucpldir : home,
  35713. !         uucplfil[0] ? uucplfil : user);
  35714.       mf |= (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
  35715.           : st.st_atime <= st.st_mtime ? UUCPNEW : UUCPOLD;
  35716.       }
  35717. ! #endif    /* MF */
  35718.   
  35719.       if ((mf & UUCPOK) || (mf & MMDFOK)) {
  35720.       if (notifysw & NT_MAIL) {
  35721. !         printf (personal ? "You have " : "%s has ", user);
  35722.           if (mf & UUCPOK)
  35723.           printf ("%s old-style bell", mf & UUCPOLD ? "old" : "new");
  35724.           if ((mf & UUCPOK) && (mf & MMDFOK))
  35725. ***************
  35726. *** 297,303 ****
  35727.       else {
  35728.       if (notifysw & NT_NMAI)
  35729.           printf (personal ? "You don't %s%s" : "%s doesn't %s",
  35730. !             personal ? "" : pw -> pw_name, "have any mail waiting");
  35731.       else
  35732.           notifysw = 0;
  35733.   
  35734. --- 354,360 ----
  35735.       else {
  35736.       if (notifysw & NT_NMAI)
  35737.           printf (personal ? "You don't %s%s" : "%s doesn't %s",
  35738. !             personal ? "" : user, "have any mail waiting");
  35739.       else
  35740.           notifysw = 0;
  35741.   
  35742. ***************
  35743. *** 309,315 ****
  35744.       if (datesw && st.st_atime)
  35745.           printf ("; last read on %s",
  35746.               dasctime (dlocaltime ((long *) & st.st_atime), TW_NULL));
  35747. ! #endif    MF
  35748.       if (notifysw)
  35749.       printf ("\n");
  35750.   
  35751. --- 366,372 ----
  35752.       if (datesw && st.st_atime)
  35753.           printf ("; last read on %s",
  35754.               dasctime (dlocaltime ((long *) & st.st_atime), TW_NULL));
  35755. ! #endif    /* MF */
  35756.       if (notifysw)
  35757.       printf ("\n");
  35758.   
  35759. ***************
  35760. *** 374,377 ****
  35761.   
  35762.       return status;
  35763.   }
  35764. ! #endif    POP
  35765. --- 431,434 ----
  35766.   
  35767.       return status;
  35768.   }
  35769. ! #endif    /* POP */
  35770. *** ../mh-6.7.2/uip/msh.c    Thu Apr  5 16:02:57 1990
  35771. --- uip/msh.c    Mon Dec 14 16:21:24 1992
  35772. ***************
  35773. *** 1,7 ****
  35774.   /* msh.c - The MH shell (sigh) */
  35775.   #ifndef    lint
  35776. ! static char ident[] = "@(#)$Id: msh.c,v 2.5 90/04/05 14:56:36 sources Exp $";
  35777. ! #endif    lint
  35778.   
  35779.   /* TODO:
  35780.       Keep more status information in maildrop map
  35781. --- 1,7 ----
  35782.   /* msh.c - The MH shell (sigh) */
  35783.   #ifndef    lint
  35784. ! static char ident[] = "@(#)$Id: msh.c,v 2.13 1992/12/15 00:20:22 jromine Exp $";
  35785. ! #endif    /* lint */
  35786.   
  35787.   /* TODO:
  35788.       Keep more status information in maildrop map
  35789. ***************
  35790. *** 19,36 ****
  35791.   #include <sys/stat.h>
  35792.   #ifndef    SYS5
  35793.   #include <sgtty.h>
  35794. ! #else    SYS5
  35795.   #include <termio.h>
  35796.   #ifndef    NOIOCTLH
  35797.   #include <sys/ioctl.h>
  35798. ! #endif    NOIOCTLH
  35799. ! #endif    SYS5
  35800.   #include <pwd.h>
  35801.   #include <setjmp.h>
  35802.   #include <signal.h>
  35803.   #include "../h/mshsbr.h"
  35804.   #include "../h/vmhsbr.h"
  35805.   
  35806.   
  35807.   #define    QUOTE    '\\'        /* sigh */
  35808.   
  35809. --- 19,44 ----
  35810.   #include <sys/stat.h>
  35811.   #ifndef    SYS5
  35812.   #include <sgtty.h>
  35813. ! #else    /* SYS5 */
  35814.   #include <termio.h>
  35815.   #ifndef    NOIOCTLH
  35816.   #include <sys/ioctl.h>
  35817. ! #endif    /* NOIOCTLH */
  35818. ! #endif    /* SYS5 */
  35819.   #include <pwd.h>
  35820.   #include <setjmp.h>
  35821.   #include <signal.h>
  35822.   #include "../h/mshsbr.h"
  35823.   #include "../h/vmhsbr.h"
  35824. + #ifdef LOCALE
  35825. + #include    <locale.h>
  35826. + #endif
  35827.   
  35828. + #ifdef    MIME
  35829. + #define    MIMEminc(a)    (a)
  35830. + #else
  35831. + #define    MIMEminc(a)    0
  35832. + #endif
  35833.   
  35834.   #define    QUOTE    '\\'        /* sigh */
  35835.   
  35836. ***************
  35837. *** 73,79 ****
  35838.   #define    HELPSW    13
  35839.       "help", 4,
  35840.   
  35841. !     NULL, NULL
  35842.   };
  35843.   
  35844.   /*   */
  35845. --- 81,87 ----
  35846.   #define    HELPSW    13
  35847.       "help", 4,
  35848.   
  35849. !     NULL, 0
  35850.   };
  35851.   
  35852.   /*   */
  35853. ***************
  35854. *** 117,132 ****
  35855.   static jmp_buf peerenv;
  35856.   
  35857.   void    padios (), padvise ();
  35858. ! static int    alrmser ();
  35859.   
  35860.   
  35861.   #ifdef    BPOP
  35862.                   /* POP */
  35863.   
  35864. ! static int pmsh = 0;        /* BPOP enabled */
  35865.   
  35866.   extern char response[];
  35867. ! #endif    BPOP
  35868.   
  35869.   
  35870.                   /* PARENT */
  35871. --- 125,140 ----
  35872.   static jmp_buf peerenv;
  35873.   
  35874.   void    padios (), padvise ();
  35875. ! static TYPESIG    alrmser ();
  35876.   
  35877.   
  35878.   #ifdef    BPOP
  35879.                   /* POP */
  35880.   
  35881. ! int    pmsh = 0;        /* BPOP enabled */
  35882.   
  35883.   extern char response[];
  35884. ! #endif    /* BPOP */
  35885.   
  35886.   
  35887.                   /* PARENT */
  35888. ***************
  35889. *** 159,165 ****
  35890.   TYPESIG (*qstat) ();        /* original SIGQUIT */
  35891.   #ifdef    SIGTSTP
  35892.   static TYPESIG  (*tstat) ();    /* original SIGTSTP */
  35893. ! #endif    SIGTSTP
  35894.   int     interrupted;        /* SIGINT detected */
  35895.   int     broken_pipe;        /* SIGPIPE detected */
  35896.   int     told_to_quit;        /* SIGQUIT detected */
  35897. --- 167,173 ----
  35898.   TYPESIG (*qstat) ();        /* original SIGQUIT */
  35899.   #ifdef    SIGTSTP
  35900.   static TYPESIG  (*tstat) ();    /* original SIGTSTP */
  35901. ! #endif    /* SIGTSTP */
  35902.   int     interrupted;        /* SIGINT detected */
  35903.   int     broken_pipe;        /* SIGPIPE detected */
  35904.   int     told_to_quit;        /* SIGQUIT detected */
  35905. ***************
  35906. *** 167,180 ****
  35907.   #ifdef    BSD42
  35908.   int     should_intr;        /* signal handler should interrupt call */
  35909.   jmp_buf sigenv;            /* the environment pointer */
  35910. ! #endif    BSD42
  35911.   
  35912. ! static int    intrser (), pipeser (), quitser ();
  35913.   
  35914.   
  35915.   #ifdef    SYS5
  35916.   struct passwd  *getpwnam ();
  35917. ! #endif    SYS5
  35918.   
  35919.   static int    read_map(), read_file(), check_folder(), getargs(), parse();
  35920.   static int    getcmds(), init_io(), initaux_io(), finaux_io(), peerwait();
  35921. --- 175,190 ----
  35922.   #ifdef    BSD42
  35923.   int     should_intr;        /* signal handler should interrupt call */
  35924.   jmp_buf sigenv;            /* the environment pointer */
  35925. ! #endif    /* BSD42 */
  35926.   
  35927. ! static TYPESIG    intrser (), pipeser (), quitser ();
  35928.   
  35929.   
  35930. + #ifndef    __STDC__
  35931.   #ifdef    SYS5
  35932.   struct passwd  *getpwnam ();
  35933. ! #endif    /* SYS5 */
  35934. ! #endif
  35935.   
  35936.   static int    read_map(), read_file(), check_folder(), getargs(), parse();
  35937.   static int    getcmds(), init_io(), initaux_io(), finaux_io(), peerwait();
  35938. ***************
  35939. *** 200,206 ****
  35940.   #ifdef    BPOP
  35941.       int        pmsh1 = 0,
  35942.           pmsh2 = 0;
  35943. ! #endif    BPOP
  35944.       char   *cp,
  35945.              *file = NULL,
  35946.              *folder = NULL,
  35947. --- 210,216 ----
  35948.   #ifdef    BPOP
  35949.       int        pmsh1 = 0,
  35950.           pmsh2 = 0;
  35951. ! #endif    /* BPOP */
  35952.       char   *cp,
  35953.              *file = NULL,
  35954.              *folder = NULL,
  35955. ***************
  35956. *** 209,214 ****
  35957. --- 219,227 ----
  35958.               buf[80],
  35959.              *arguments[MAXARGS];
  35960.   
  35961. + #ifdef LOCALE
  35962. +     setlocale(LC_ALL, "");
  35963. + #endif
  35964.       invo_name = r1bindex (argv[0], '/');
  35965.       mts_init (invo_name);
  35966.       if ((cp = m_find (invo_name)) != NULL) {
  35967. ***************
  35968. *** 289,295 ****
  35969.   #ifdef    BPOP
  35970.               if ((pmsh1 = atoi (cp)) < 1)
  35971.               adios (NULLCP, "bad argument %s %s", argp[-2], cp);
  35972. ! #endif    BPOP
  35973.               continue;
  35974.           case PWRITSW: 
  35975.               if (!(cp = *argp++) || *cp == '-')
  35976. --- 302,308 ----
  35977.   #ifdef    BPOP
  35978.               if ((pmsh1 = atoi (cp)) < 1)
  35979.               adios (NULLCP, "bad argument %s %s", argp[-2], cp);
  35980. ! #endif    /* BPOP */
  35981.               continue;
  35982.           case PWRITSW: 
  35983.               if (!(cp = *argp++) || *cp == '-')
  35984. ***************
  35985. *** 297,303 ****
  35986.   #ifdef    BPOP
  35987.               if ((pmsh2 = atoi (cp)) < 1)
  35988.               adios (NULLCP, "bad argument %s %s", argp[-2], cp);
  35989. ! #endif    BPOP
  35990.               continue;
  35991.   
  35992.           case TCURSW:
  35993. --- 310,316 ----
  35994.   #ifdef    BPOP
  35995.               if ((pmsh2 = atoi (cp)) < 1)
  35996.               adios (NULLCP, "bad argument %s %s", argp[-2], cp);
  35997. ! #endif    /* BPOP */
  35998.               continue;
  35999.   
  36000.           case TCURSW:
  36001. ***************
  36002. *** 330,340 ****
  36003.   #ifdef    FIOCLEX
  36004.       if (pfd > 1)
  36005.       (void) ioctl (pfd, FIOCLEX, NULLCP);
  36006. ! #endif    FIOCLEX
  36007.   
  36008.   #ifdef    BSD42
  36009.       should_intr = 0;
  36010. ! #endif    BSD42
  36011.       setsigx (istat, SIGINT, intrser);
  36012.       setsigx (qstat, SIGQUIT, quitser);
  36013.   
  36014. --- 343,353 ----
  36015.   #ifdef    FIOCLEX
  36016.       if (pfd > 1)
  36017.       (void) ioctl (pfd, FIOCLEX, NULLCP);
  36018. ! #endif    /* FIOCLEX */
  36019.   
  36020.   #ifdef    BSD42
  36021.       should_intr = 0;
  36022. ! #endif    /* BSD42 */
  36023.       setsigx (istat, SIGINT, intrser);
  36024.       setsigx (qstat, SIGQUIT, quitser);
  36025.   
  36026. ***************
  36027. *** 347,353 ****
  36028.       (void) signal (SIGQUIT, SIG_IGN);
  36029.   #ifdef    SIGTSTP
  36030.       tstat = signal (SIGTSTP, SIG_IGN);
  36031. ! #endif    SIGTSTP
  36032.       }
  36033.   
  36034.   #ifdef    BPOP
  36035. --- 360,366 ----
  36036.       (void) signal (SIGQUIT, SIG_IGN);
  36037.   #ifdef    SIGTSTP
  36038.       tstat = signal (SIGTSTP, SIG_IGN);
  36039. ! #endif    /* SIGTSTP */
  36040.       }
  36041.   
  36042.   #ifdef    BPOP
  36043. ***************
  36044. *** 355,368 ****
  36045.       cp = getenv ("MHPOPDEBUG");
  36046.   #ifdef    NNTP
  36047.       if (pop_set (pmsh1, pmsh2, cp && *cp, myname) == NOTOK)
  36048. ! #else    NNTP
  36049.       if (pop_set (pmsh1, pmsh2, cp && *cp) == NOTOK)
  36050. ! #endif    NNTP
  36051.           padios (NULLCP, "%s", response);
  36052.       if (folder)
  36053.           file = folder, folder = NULL;
  36054.       }
  36055. ! #endif    BPOP
  36056.   
  36057.       if (folder)
  36058.       fsetup (folder);
  36059. --- 368,381 ----
  36060.       cp = getenv ("MHPOPDEBUG");
  36061.   #ifdef    NNTP
  36062.       if (pop_set (pmsh1, pmsh2, cp && *cp, myname) == NOTOK)
  36063. ! #else    /* NNTP */
  36064.       if (pop_set (pmsh1, pmsh2, cp && *cp) == NOTOK)
  36065. ! #endif    /* NNTP */
  36066.           padios (NULLCP, "%s", response);
  36067.       if (folder)
  36068.           file = folder, folder = NULL;
  36069.       }
  36070. ! #endif    /* BPOP */
  36071.   
  36072.       if (folder)
  36073.       fsetup (folder);
  36074. ***************
  36075. *** 405,442 ****
  36076.       "mark", 0,
  36077.   #define    MAILCMD    11
  36078.       "mhmail", 0,
  36079. ! #define    MSGKCMD    12
  36080.       "msgchk", 0,
  36081. ! #define    NEXTCMD    13
  36082.       "next", 0,
  36083. ! #define    PACKCMD    14
  36084.       "packf", 0,
  36085. ! #define    PICKCMD    15
  36086.       "pick", 0,
  36087. ! #define    PREVCMD    16
  36088.       "prev", 0,
  36089. ! #define    QUITCMD    17
  36090.       "quit", 0,
  36091. ! #define    FILECMD    18
  36092.       "refile", 0,
  36093. ! #define    REPLCMD    19
  36094.       "repl", 0,
  36095. ! #define    RMMCMD    20
  36096.       "rmm", 0,
  36097. ! #define    SCANCMD    21
  36098.       "scan", 0,
  36099. ! #define    SENDCMD    22
  36100.       "send", 0,
  36101. ! #define    SHOWCMD    23
  36102.       "show", 0,
  36103. ! #define    SORTCMD    24
  36104.       "sortm", 0,
  36105. ! #define    WHATCMD    25
  36106.       "whatnow", 0,
  36107. ! #define    WHOMCMD    26
  36108.       "whom", 0,
  36109.   
  36110. !     NULL, NULL
  36111.   };
  36112.   
  36113.   /*   */
  36114. --- 418,457 ----
  36115.       "mark", 0,
  36116.   #define    MAILCMD    11
  36117.       "mhmail", 0,
  36118. ! #define    MHNCMD    12
  36119. !     "mhn", MIMEminc(-3),
  36120. ! #define    MSGKCMD    13
  36121.       "msgchk", 0,
  36122. ! #define    NEXTCMD    14
  36123.       "next", 0,
  36124. ! #define    PACKCMD    15
  36125.       "packf", 0,
  36126. ! #define    PICKCMD    16
  36127.       "pick", 0,
  36128. ! #define    PREVCMD    17
  36129.       "prev", 0,
  36130. ! #define    QUITCMD    18
  36131.       "quit", 0,
  36132. ! #define    FILECMD    19
  36133.       "refile", 0,
  36134. ! #define    REPLCMD    20
  36135.       "repl", 0,
  36136. ! #define    RMMCMD    21
  36137.       "rmm", 0,
  36138. ! #define    SCANCMD    22
  36139.       "scan", 0,
  36140. ! #define    SENDCMD    23
  36141.       "send", 0,
  36142. ! #define    SHOWCMD    24
  36143.       "show", 0,
  36144. ! #define    SORTCMD    25
  36145.       "sortm", 0,
  36146. ! #define    WHATCMD    26
  36147.       "whatnow", 0,
  36148. ! #define    WHOMCMD    27
  36149.       "whom", 0,
  36150.   
  36151. !     NULL, 0
  36152.   };
  36153.   
  36154.   /*   */
  36155. ***************
  36156. *** 578,583 ****
  36157. --- 593,605 ----
  36158.               markcmd (vec);
  36159.           break;
  36160.   
  36161. +         case MHNCMD:
  36162. + #ifdef    MIME
  36163. +         if (!vmh || ttyN (cmdp) != NOTOK)
  36164. +             mhncmd (vec);
  36165. + #endif
  36166. +         break;
  36167.           case NEXTCMD: 
  36168.           case PREVCMD: 
  36169.           case SHOWCMD: 
  36170. ***************
  36171. *** 673,681 ****
  36172.   
  36173.   #ifndef    BSD42
  36174.       maxfds = _NFILE / 2;
  36175. ! #else    BSD42
  36176.       maxfds = getdtablesize () / 2;
  36177. ! #endif    BSD42
  36178.       if ((maxfds -= 2) < 1)
  36179.       maxfds = 1;
  36180.   }
  36181. --- 695,703 ----
  36182.   
  36183.   #ifndef    BSD42
  36184.       maxfds = _NFILE / 2;
  36185. ! #else    /* BSD42 */
  36186.       maxfds = getdtablesize () / 2;
  36187. ! #endif    /* BSD42 */
  36188.       if ((maxfds -= 2) < 1)
  36189.       maxfds = 1;
  36190.   }
  36191. ***************
  36192. *** 689,695 ****
  36193.               msgp;
  36194.   #ifdef    BPOP
  36195.       char    tmpfil[BUFSIZ];
  36196. ! #endif    BPOP
  36197.       struct stat st;
  36198.   
  36199.   #ifdef    BPOP
  36200. --- 711,717 ----
  36201.               msgp;
  36202.   #ifdef    BPOP
  36203.       char    tmpfil[BUFSIZ];
  36204. ! #endif    /* BPOP */
  36205.       struct stat st;
  36206.   
  36207.   #ifdef    BPOP
  36208. ***************
  36209. *** 700,711 ****
  36210.       (void) unlink (tmpfil);
  36211.       }
  36212.       else
  36213. ! #endif    BPOP
  36214.       if ((fp = fopen (file, "r")) == NULL)
  36215.       padios (file, "unable to read");
  36216.   #ifdef    FIOCLEX
  36217.       (void) ioctl (fileno (fp), FIOCLEX, NULLCP);
  36218. ! #endif    FIOCLEX
  36219.       if (fstat (fileno (fp), &st) != NOTOK) {
  36220.       mode = (int) (st.st_mode & 0777), mtime = st.st_mtime;
  36221.       msgp = read_map (file, (long) st.st_size);
  36222. --- 722,733 ----
  36223.       (void) unlink (tmpfil);
  36224.       }
  36225.       else
  36226. ! #endif    /* BPOP */
  36227.       if ((fp = fopen (file, "r")) == NULL)
  36228.       padios (file, "unable to read");
  36229.   #ifdef    FIOCLEX
  36230.       (void) ioctl (fileno (fp), FIOCLEX, NULLCP);
  36231. ! #endif    /* FIOCLEX */
  36232.       if (fstat (fileno (fp), &st) != NOTOK) {
  36233.       mode = (int) (st.st_mode & 0777), mtime = st.st_mtime;
  36234.       msgp = read_map (file, (long) st.st_size);
  36235. ***************
  36236. *** 718,724 ****
  36237.       if ((msgp = read_file (msgp ? Msgs[msgp].m_stop : 0L, msgp + 1)) < 1)
  36238.       padios (NULLCP, "no messages in %s", myname ? myname : file);
  36239.   
  36240. !     mp = (struct msgs  *) calloc ((unsigned) 1, MSIZE (mp, 1, msgp + 1));
  36241.       if (mp == NULL)
  36242.       padios (NULLCP, "unable to allocate folder storage");
  36243.   
  36244. --- 740,746 ----
  36245.       if ((msgp = read_file (msgp ? Msgs[msgp].m_stop : 0L, msgp + 1)) < 1)
  36246.       padios (NULLCP, "no messages in %s", myname ? myname : file);
  36247.   
  36248. !     mp = (struct msgs  *) calloc ((unsigned) 1, MHSIZE (mp, 1, msgp + 1));
  36249.       if (mp == NULL)
  36250.       padios (NULLCP, "unable to allocate folder storage");
  36251.   
  36252. ***************
  36253. *** 728,757 ****
  36254.       mp -> curmsg = 0;
  36255.   
  36256.       mp -> foldpath = getcpy (myname ? myname : file);
  36257. !     mp -> msgflags = NULL;
  36258.   #ifdef    BPOP
  36259.       if (pmsh)
  36260.       mp -> msgflags |= READONLY;
  36261.       else {
  36262. ! #endif    BPOP
  36263.       (void) stat (file, &st);
  36264.       if (st.st_uid != getuid () || access (file, 02) == NOTOK)
  36265.           mp -> msgflags |= READONLY;
  36266.   #ifdef    BPOP
  36267.       }
  36268. ! #endif    BPOP
  36269.       mp -> lowoff = 1;
  36270.       mp -> hghoff = mp -> hghmsg + 1;
  36271.   
  36272.   #ifdef    MTR
  36273.       mp -> msgstats = (short *)
  36274. !         calloc ((unsigned) 1, MSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
  36275.       if (mp -> msgstats == NULL)
  36276.       padios (NULLCP, "unable to allocate messages storage");
  36277.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  36278.       if (mp -> msgstats < (short *)0)
  36279.       padios (NULLCP, "setup() botch -- you lose big");
  36280. ! #endif    MTR
  36281.   #ifdef    BPOP
  36282.       if (pmsh) {
  36283.   #ifndef    NNTP
  36284. --- 750,779 ----
  36285.       mp -> curmsg = 0;
  36286.   
  36287.       mp -> foldpath = getcpy (myname ? myname : file);
  36288. !     mp -> msgflags = 0;
  36289.   #ifdef    BPOP
  36290.       if (pmsh)
  36291.       mp -> msgflags |= READONLY;
  36292.       else {
  36293. ! #endif    /* BPOP */
  36294.       (void) stat (file, &st);
  36295.       if (st.st_uid != getuid () || access (file, 02) == NOTOK)
  36296.           mp -> msgflags |= READONLY;
  36297.   #ifdef    BPOP
  36298.       }
  36299. ! #endif    /* BPOP */
  36300.       mp -> lowoff = 1;
  36301.       mp -> hghoff = mp -> hghmsg + 1;
  36302.   
  36303.   #ifdef    MTR
  36304.       mp -> msgstats = (short *)
  36305. !         calloc ((unsigned) 1, MHSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
  36306.       if (mp -> msgstats == NULL)
  36307.       padios (NULLCP, "unable to allocate messages storage");
  36308.       mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
  36309.       if (mp -> msgstats < (short *)0)
  36310.       padios (NULLCP, "setup() botch -- you lose big");
  36311. ! #endif    /* MTR */
  36312.   #ifdef    BPOP
  36313.       if (pmsh) {
  36314.   #ifndef    NNTP
  36315. ***************
  36316. *** 759,773 ****
  36317.           Msgs[i].m_top = i;
  36318.           mp -> msgstats[i] = EXISTS | VIRTUAL;
  36319.       }
  36320. ! #else    NNTP
  36321.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++) {
  36322.           if (Msgs[i].m_top)            /* set in read_pop() */
  36323.           mp -> msgstats[i] = EXISTS | VIRTUAL;
  36324.       }
  36325. ! #endif    NNTP
  36326.       }
  36327.       else
  36328. ! #endif    BPOP
  36329.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
  36330.       mp -> msgstats[i] = EXISTS;
  36331.       m_init ();
  36332. --- 781,795 ----
  36333.           Msgs[i].m_top = i;
  36334.           mp -> msgstats[i] = EXISTS | VIRTUAL;
  36335.       }
  36336. ! #else    /* NNTP */
  36337.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++) {
  36338.           if (Msgs[i].m_top)            /* set in read_pop() */
  36339.           mp -> msgstats[i] = EXISTS | VIRTUAL;
  36340.       }
  36341. ! #endif    /* NNTP */
  36342.       }
  36343.       else
  36344. ! #endif    /* BPOP */
  36345.       for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
  36346.       mp -> msgstats[i] = EXISTS;
  36347.       m_init ();
  36348. ***************
  36349. *** 797,803 ****
  36350.   #ifdef    BPOP
  36351.       if (pmsh)
  36352.       return read_pop ();
  36353. ! #endif    BPOP
  36354.   
  36355.       if ((i = map_read (file, size, &rp, 1)) == 0)
  36356.       return 0;
  36357. --- 819,825 ----
  36358.   #ifdef    BPOP
  36359.       if (pmsh)
  36360.       return read_pop ();
  36361. ! #endif    /* BPOP */
  36362.   
  36363.       if ((i = map_read (file, size, &rp, 1)) == 0)
  36364.       return 0;
  36365. ***************
  36366. *** 832,838 ****
  36367.   #ifdef    BPOP
  36368.       if (pmsh)
  36369.       return (msgp - 1);
  36370. ! #endif    BPOP
  36371.   
  36372.       if ((i = mbx_read (fp, pos, &rp, 1)) <= 0)
  36373.       return (msgp - 1);
  36374. --- 854,860 ----
  36375.   #ifdef    BPOP
  36376.       if (pmsh)
  36377.       return (msgp - 1);
  36378. ! #endif    /* BPOP */
  36379.   
  36380.       if ((i = mbx_read (fp, pos, &rp, 1)) <= 0)
  36381.       return (msgp - 1);
  36382. ***************
  36383. *** 867,873 ****
  36384.       Msgs[n].m_top = Msgs[n].m_bboard_id = i;
  36385.   }
  36386.   
  36387. ! #endif    NNTP
  36388.   static int  read_pop () {
  36389.       int        nmsgs,
  36390.               nbytes;
  36391. --- 889,895 ----
  36392.       Msgs[n].m_top = Msgs[n].m_bboard_id = i;
  36393.   }
  36394.   
  36395. ! #endif    /* NNTP */
  36396.   static int  read_pop () {
  36397.       int        nmsgs,
  36398.               nbytes;
  36399. ***************
  36400. *** 880,886 ****
  36401.   #ifdef    NNTP    /* this makes read_pop() do some real work... */
  36402.       pop_base = nbytes - 1;     /* nmsgs=last-first+1, nbytes=first */
  36403.       pop_exists (pop_statmsg);
  36404. ! #endif    NNTP
  36405.       return nmsgs;
  36406.   }
  36407.   
  36408. --- 902,908 ----
  36409.   #ifdef    NNTP    /* this makes read_pop() do some real work... */
  36410.       pop_base = nbytes - 1;     /* nmsgs=last-first+1, nbytes=first */
  36411.       pop_exists (pop_statmsg);
  36412. ! #endif    /* NNTP */
  36413.       return nmsgs;
  36414.   }
  36415.   
  36416. ***************
  36417. *** 890,896 ****
  36418.   {
  36419.       fprintf (yp, "%s\n", s);
  36420.   }
  36421. ! #endif    BPOP
  36422.   
  36423.   /*   */
  36424.   
  36425. --- 912,918 ----
  36426.   {
  36427.       fprintf (yp, "%s\n", s);
  36428.   }
  36429. ! #endif    /* BPOP */
  36430.   
  36431.   /*   */
  36432.   
  36433. ***************
  36434. *** 897,902 ****
  36435. --- 919,926 ----
  36436.   static m_gMsgs (n)
  36437.   int    n;
  36438.   {
  36439. +     int        nmsgs;
  36440.       if (Msgs == NULL) {
  36441.       nMsgs = n + MAXFOLDER / 2;
  36442.       Msgs = (struct Msg *) calloc ((unsigned) (nMsgs + 2), sizeof *Msgs);
  36443. ***************
  36444. *** 908,918 ****
  36445.       if (nMsgs >= n)
  36446.       return;
  36447.   
  36448. !     nMsgs = n + MAXFOLDER / 2;
  36449.       Msgs = (struct Msg *) realloc ((char *) Msgs,
  36450. !                         (unsigned) (nMsgs + 2) * sizeof *Msgs);
  36451.       if (Msgs == NULL)
  36452.       padios (NULLCP, "unable to reallocate Msgs structure");
  36453.   }
  36454.   
  36455.   /*   */
  36456. --- 932,946 ----
  36457.       if (nMsgs >= n)
  36458.       return;
  36459.   
  36460. !     nmsgs = nMsgs + n + MAXFOLDER / 2;
  36461.       Msgs = (struct Msg *) realloc ((char *) Msgs,
  36462. !                         (unsigned) (nmsgs + 2) * sizeof *Msgs);
  36463.       if (Msgs == NULL)
  36464.       padios (NULLCP, "unable to reallocate Msgs structure");
  36465. +     bzero ((char *) (Msgs + nMsgs + 2),
  36466. +        (unsigned) ((nmsgs - nMsgs) * sizeof *Msgs));
  36467. +     nMsgs = nmsgs;
  36468.   }
  36469.   
  36470.   /*   */
  36471. ***************
  36472. *** 1000,1006 ****
  36473.   
  36474.       mp -> msgstats[msgnum] &= ~VIRTUAL;
  36475.       }
  36476. ! #endif    BPOP
  36477.   
  36478.       m_eomsbr ((int (*)()) 0);    /* XXX */
  36479.       (void) fseek (fp, Msgs[msgnum].m_start, 0);
  36480. --- 1028,1034 ----
  36481.   
  36482.       mp -> msgstats[msgnum] &= ~VIRTUAL;
  36483.       }
  36484. ! #endif    /* BPOP */
  36485.   
  36486.       m_eomsbr ((int (*)()) 0);    /* XXX */
  36487.       (void) fseek (fp, Msgs[msgnum].m_start, 0);
  36488. ***************
  36489. *** 1022,1028 ****
  36490.   #ifdef    BPOP
  36491.       if (pmsh)
  36492.       return 0;
  36493. ! #endif    BPOP
  36494.   
  36495.       if (fmsh) {
  36496.       if (stat (mp -> foldpath, &st) == NOTOK)
  36497. --- 1050,1056 ----
  36498.   #ifdef    BPOP
  36499.       if (pmsh)
  36500.       return 0;
  36501. ! #endif    /* BPOP */
  36502.   
  36503.       if (fmsh) {
  36504.       if (stat (mp -> foldpath, &st) == NOTOK)
  36505. ***************
  36506. *** 1182,1188 ****
  36507.       int        arg1,
  36508.           arg2,
  36509.           arg3;
  36510. ! #endif    BPOP
  36511.       char   *bp,
  36512.               buf[BUFSIZ],
  36513.               name[NAMESZ];
  36514. --- 1210,1216 ----
  36515.       int        arg1,
  36516.           arg2,
  36517.           arg3;
  36518. ! #endif    /* BPOP */
  36519.       char   *bp,
  36520.               buf[BUFSIZ],
  36521.               name[NAMESZ];
  36522. ***************
  36523. *** 1198,1204 ****
  36524.           && arg3 > 0)
  36525.           return (Msgs[msgnum].m_bboard_id = arg3);
  36526.       }
  36527. ! #endif    BPOP
  36528.   
  36529.       zp = msh_ready (msgnum, 0);
  36530.       for (state = FLD;;)
  36531. --- 1226,1232 ----
  36532.           && arg3 > 0)
  36533.           return (Msgs[msgnum].m_bboard_id = arg3);
  36534.       }
  36535. ! #endif    /* BPOP */
  36536.   
  36537.       zp = msh_ready (msgnum, 0);
  36538.       for (state = FLD;;)
  36539. ***************
  36540. *** 1244,1256 ****
  36541.   #ifndef    BSD42            /* XXX */
  36542.   #ifdef    FIOCLEX
  36543.       (void) ioctl (sd, FIOCLEX, NULL);
  36544. ! #endif    FIOCLEX
  36545. ! #endif    not BSD42
  36546.       if ((sp = fdopen (sd, "w")) == NULL)
  36547.           padios ("standard output", "unable to fdopen");
  36548.       }
  36549.   
  36550. !     (void) putenv ("mhfolder", mp -> foldpath);
  36551.       if (vmh)
  36552.       return;
  36553.   
  36554. --- 1272,1284 ----
  36555.   #ifndef    BSD42            /* XXX */
  36556.   #ifdef    FIOCLEX
  36557.       (void) ioctl (sd, FIOCLEX, NULL);
  36558. ! #endif    /* FIOCLEX */
  36559. ! #endif    /* not BSD42 */
  36560.       if ((sp = fdopen (sd, "w")) == NULL)
  36561.           padios ("standard output", "unable to fdopen");
  36562.       }
  36563.   
  36564. !     (void) m_putenv ("mhfolder", mp -> foldpath);
  36565.       if (vmh)
  36566.       return;
  36567.   
  36568. ***************
  36569. *** 1427,1433 ****
  36570.               (void) kill (ppid, SIGEMT);
  36571.           return EOF;
  36572.       }
  36573. ! #endif    BSD42
  36574.       if (interactive) {
  36575.           printf ("%s", prompt);
  36576.           (void) fflush (stdout);
  36577. --- 1455,1461 ----
  36578.               (void) kill (ppid, SIGEMT);
  36579.           return EOF;
  36580.       }
  36581. ! #endif    /* BSD42 */
  36582.       if (interactive) {
  36583.           printf ("%s", prompt);
  36584.           (void) fflush (stdout);
  36585. ***************
  36586. *** 1444,1459 ****
  36587.               (void) kill (ppid, SIGEMT);
  36588.           return EOF;
  36589.           }
  36590. ! #else    BSD42
  36591.           if (i == EOF)
  36592.           longjmp (sigenv, DONE);
  36593. ! #endif    BSD42
  36594.           if (cp < &buffer[sizeof buffer - 2])
  36595.           *cp++ = i;
  36596.       }
  36597. !     *cp = NULL;
  36598.   
  36599. !     if (buffer[0] == NULL)
  36600.           continue;
  36601.       if (buffer[0] == '?') {
  36602.           printf ("commands:\n");
  36603. --- 1472,1487 ----
  36604.               (void) kill (ppid, SIGEMT);
  36605.           return EOF;
  36606.           }
  36607. ! #else    /* BSD42 */
  36608.           if (i == EOF)
  36609.           longjmp (sigenv, DONE);
  36610. ! #endif    /* BSD42 */
  36611.           if (cp < &buffer[sizeof buffer - 2])
  36612.           *cp++ = i;
  36613.       }
  36614. !     *cp = 0;
  36615.   
  36616. !     if (buffer[0] == 0)
  36617.           continue;
  36618.       if (buffer[0] == '?') {
  36619.           printf ("commands:\n");
  36620. ***************
  36621. *** 1477,1483 ****
  36622.           default: 
  36623.   #ifdef    BSD42
  36624.           should_intr = 0;
  36625. ! #endif    BSD42
  36626.           return i;
  36627.       }
  36628.       }
  36629. --- 1505,1511 ----
  36630.           default: 
  36631.   #ifdef    BSD42
  36632.           should_intr = 0;
  36633. ! #endif    /* BSD42 */
  36634.           return i;
  36635.       }
  36636.       }
  36637. ***************
  36638. *** 1532,1538 ****
  36639.              *cp,
  36640.              *pp;
  36641.   
  36642. !     cmdp -> line[0] = NULL;
  36643.       pp = cmdp -> args[argp++] = cmdp -> line;
  36644.       cmdp -> redirect = NULL;
  36645.       cmdp -> direction = STDIO;
  36646. --- 1560,1566 ----
  36647.              *cp,
  36648.              *pp;
  36649.   
  36650. !     cmdp -> line[0] = 0;
  36651.       pp = cmdp -> args[argp++] = cmdp -> line;
  36652.       cmdp -> redirect = NULL;
  36653.       cmdp -> direction = STDIO;
  36654. ***************
  36655. *** 1541,1547 ****
  36656.       for (cp = buffer; c = *cp; cp++)
  36657.       if (!isspace (c))
  36658.           break;
  36659. !     if (c == NULL) {
  36660.       if (vmh)
  36661.           (void) fmt2peer (RC_EOF, "null command");
  36662.       return NOTOK;
  36663. --- 1569,1575 ----
  36664.       for (cp = buffer; c = *cp; cp++)
  36665.       if (!isspace (c))
  36666.           break;
  36667. !     if (c == 0) {
  36668.       if (vmh)
  36669.           (void) fmt2peer (RC_EOF, "null command");
  36670.       return NOTOK;
  36671. ***************
  36672. *** 1551,1561 ****
  36673.       if (isspace (c)) {
  36674.           while (isspace (c))
  36675.           c = *cp++;
  36676. !         if (c == NULL)
  36677.           break;
  36678. !         *pp++ = NULL;
  36679.           cmdp -> args[argp++] = pp;
  36680. !         *pp = NULL;
  36681.       }
  36682.   
  36683.       switch (c) {
  36684. --- 1579,1589 ----
  36685.       if (isspace (c)) {
  36686.           while (isspace (c))
  36687.           c = *cp++;
  36688. !         if (c == 0)
  36689.           break;
  36690. !         *pp++ = 0;
  36691.           cmdp -> args[argp++] = pp;
  36692. !         *pp = 0;
  36693.       }
  36694.   
  36695.       switch (c) {
  36696. ***************
  36697. *** 1562,1574 ****
  36698.           case '"': 
  36699.           for (;;) {
  36700.               switch (c = *cp++) {
  36701. !             case NULL: 
  36702.                   padvise (NULLCP, "unmatched \"");
  36703.                   return NOTOK;
  36704.               case '"': 
  36705.                   break;
  36706.               case QUOTE: 
  36707. !                 if ((c = *cp++) == NULL)
  36708.                   goto no_quoting;
  36709.               default: 
  36710.                   *pp++ = c;
  36711. --- 1590,1602 ----
  36712.           case '"': 
  36713.           for (;;) {
  36714.               switch (c = *cp++) {
  36715. !             case 0: 
  36716.                   padvise (NULLCP, "unmatched \"");
  36717.                   return NOTOK;
  36718.               case '"': 
  36719.                   break;
  36720.               case QUOTE: 
  36721. !                 if ((c = *cp++) == 0)
  36722.                   goto no_quoting;
  36723.               default: 
  36724.                   *pp++ = c;
  36725. ***************
  36726. *** 1579,1585 ****
  36727.           continue;
  36728.   
  36729.           case QUOTE: 
  36730. !         if ((c = *cp++) == NULL) {
  36731.           no_quoting: ;
  36732.               padvise (NULLCP, "the newline character can not be quoted");
  36733.               return NOTOK;
  36734. --- 1607,1613 ----
  36735.           continue;
  36736.   
  36737.           case QUOTE: 
  36738. !         if ((c = *cp++) == 0) {
  36739.           no_quoting: ;
  36740.               padvise (NULLCP, "the newline character can not be quoted");
  36741.               return NOTOK;
  36742. ***************
  36743. *** 1595,1601 ****
  36744.               padvise (NULLCP, "invalid null command");
  36745.               return NOTOK;
  36746.           }
  36747. !         if (*cmdp -> args[argp - 1] == NULL)
  36748.               argp--;
  36749.           cmdp -> direction = c == '>' ? CRTIO : PIPIO;
  36750.           if (cmdp -> direction == CRTIO && (c = *cp) == '>') {
  36751. --- 1623,1629 ----
  36752.               padvise (NULLCP, "invalid null command");
  36753.               return NOTOK;
  36754.           }
  36755. !         if (*cmdp -> args[argp - 1] == 0)
  36756.               argp--;
  36757.           cmdp -> direction = c == '>' ? CRTIO : PIPIO;
  36758.           if (cmdp -> direction == CRTIO && (c = *cp) == '>') {
  36759. ***************
  36760. *** 1606,1612 ****
  36761.           for (; c = *cp; cp++)
  36762.               if (!isspace (c))
  36763.               break;
  36764. !         if (c == NULL) {
  36765.               padvise (NULLCP, cmdp -> direction != PIPIO
  36766.                   ? "missing name for redirect"
  36767.                   : "invalid null command");
  36768. --- 1634,1640 ----
  36769.           for (; c = *cp; cp++)
  36770.               if (!isspace (c))
  36771.               break;
  36772. !         if (c == 0) {
  36773.               padvise (NULLCP, cmdp -> direction != PIPIO
  36774.                   ? "missing name for redirect"
  36775.                   : "invalid null command");
  36776. ***************
  36777. *** 1627,1633 ****
  36778.       break;
  36779.       }
  36780.   
  36781. !     *pp++ = NULL;
  36782.       cmdp -> args[argp] = NULL;
  36783.   
  36784.       return OK;
  36785. --- 1655,1661 ----
  36786.       break;
  36787.       }
  36788.   
  36789. !     *pp++ = 0;
  36790.       cmdp -> args[argp] = NULL;
  36791.   
  36792.       return OK;
  36793. ***************
  36794. *** 1647,1654 ****
  36795.       return OK;
  36796.   
  36797.       if (cp = index (pp = redirect + 1, '/'))
  36798. !     *cp++ = NULL;
  36799. !     if (*pp == NULL)
  36800.       pp = mypath;
  36801.       else
  36802.       if (pw = getpwnam (pp))
  36803. --- 1675,1682 ----
  36804.       return OK;
  36805.   
  36806.       if (cp = index (pp = redirect + 1, '/'))
  36807. !     *cp++ = 0;
  36808. !     if (*pp == 0)
  36809.       pp = mypath;
  36810.       else
  36811.       if (pw = getpwnam (pp))
  36812. ***************
  36813. *** 1793,1799 ****
  36814.       (void) pop_done ();
  36815.       pmsh = 0;
  36816.       }
  36817. ! #endif    BPOP
  36818.   }
  36819.   
  36820.   /*   */
  36821. --- 1821,1827 ----
  36822.       (void) pop_done ();
  36823.       pmsh = 0;
  36824.       }
  36825. ! #endif    /* BPOP */
  36826.   }
  36827.   
  36828.   /*   */
  36829. ***************
  36830. *** 1821,1832 ****
  36831.   
  36832.   /* ARGSUSED */
  36833.   
  36834. ! static int  intrser (i)
  36835.   int     i;
  36836.   {
  36837.   #ifndef    BSD42
  36838.       (void) signal (SIGINT, intrser);
  36839. ! #endif    not BSD42
  36840.   
  36841.       discard (stdout);
  36842.   
  36843. --- 1849,1860 ----
  36844.   
  36845.   /* ARGSUSED */
  36846.   
  36847. ! static TYPESIG  intrser (i)
  36848.   int     i;
  36849.   {
  36850.   #ifndef    BSD42
  36851.       (void) signal (SIGINT, intrser);
  36852. ! #endif    /* not BSD42 */
  36853.   
  36854.       discard (stdout);
  36855.   
  36856. ***************
  36857. *** 1834,1851 ****
  36858.   #ifdef    BSD42
  36859.       if (should_intr)
  36860.       longjmp (sigenv, NOTOK);
  36861. ! #endif    BSD42
  36862.   }
  36863.   
  36864.   
  36865.   /* ARGSUSED */
  36866.   
  36867. ! static int  pipeser (i)
  36868.   int     i;
  36869.   {
  36870.   #ifndef    BSD42
  36871.       (void) signal (SIGPIPE, pipeser);
  36872. ! #endif    not BSD42
  36873.   
  36874.       if (broken_pipe++ == 0)
  36875.       fprintf (stderr, "broken pipe\n");
  36876. --- 1862,1879 ----
  36877.   #ifdef    BSD42
  36878.       if (should_intr)
  36879.       longjmp (sigenv, NOTOK);
  36880. ! #endif    /* BSD42 */
  36881.   }
  36882.   
  36883.   
  36884.   /* ARGSUSED */
  36885.   
  36886. ! static TYPESIG  pipeser (i)
  36887.   int     i;
  36888.   {
  36889.   #ifndef    BSD42
  36890.       (void) signal (SIGPIPE, pipeser);
  36891. ! #endif    /* not BSD42 */
  36892.   
  36893.       if (broken_pipe++ == 0)
  36894.       fprintf (stderr, "broken pipe\n");
  36895. ***************
  36896. *** 1854,1871 ****
  36897.   #ifdef    BSD42
  36898.       if (should_intr)
  36899.       longjmp (sigenv, NOTOK);
  36900. ! #endif    BSD42
  36901.   }
  36902.   
  36903.   
  36904.   /* ARGSUSED */
  36905.   
  36906. ! static int  quitser (i)
  36907.   int     i;
  36908.   {
  36909.   #ifndef    BSD42
  36910.       (void) signal (SIGQUIT, quitser);
  36911. ! #endif    BSD42
  36912.   
  36913.       told_to_quit++;
  36914.       interrupted++;
  36915. --- 1882,1899 ----
  36916.   #ifdef    BSD42
  36917.       if (should_intr)
  36918.       longjmp (sigenv, NOTOK);
  36919. ! #endif    /* BSD42 */
  36920.   }
  36921.   
  36922.   
  36923.   /* ARGSUSED */
  36924.   
  36925. ! static TYPESIG  quitser (i)
  36926.   int     i;
  36927.   {
  36928.   #ifndef    BSD42
  36929.       (void) signal (SIGQUIT, quitser);
  36930. ! #endif    /* BSD42 */
  36931.   
  36932.       told_to_quit++;
  36933.       interrupted++;
  36934. ***************
  36935. *** 1872,1878 ****
  36936.   #ifdef    BSD42
  36937.       if (should_intr)
  36938.       longjmp (sigenv, NOTOK);
  36939. ! #endif    BSD42
  36940.   }
  36941.   
  36942.   /*   */
  36943. --- 1900,1906 ----
  36944.   #ifdef    BSD42
  36945.       if (should_intr)
  36946.       longjmp (sigenv, NOTOK);
  36947. ! #endif    /* BSD42 */
  36948.   }
  36949.   
  36950.   /*   */
  36951. ***************
  36952. *** 2225,2231 ****
  36953.   
  36954.   /* ARGSUSED */
  36955.   
  36956. ! static int alrmser (i)
  36957.   int    i;
  36958.   {
  36959.       longjmp (peerenv, DONE);
  36960. --- 2253,2259 ----
  36961.   
  36962.   /* ARGSUSED */
  36963.   
  36964. ! static TYPESIG alrmser (i)
  36965.   int    i;
  36966.   {
  36967.       longjmp (peerenv, DONE);
  36968. ***************
  36969. *** 2265,2271 ****
  36970.   
  36971.   #ifdef    SIGTSTP
  36972.       (void) signal (SIGTSTP, tstat);
  36973. ! #endif    SIGTSTP
  36974.       return vmhtty;
  36975.   }
  36976.   
  36977. --- 2293,2299 ----
  36978.   
  36979.   #ifdef    SIGTSTP
  36980.       (void) signal (SIGTSTP, tstat);
  36981. ! #endif    /* SIGTSTP */
  36982.       return vmhtty;
  36983.   }
  36984.   
  36985. ***************
  36986. *** 2279,2285 ****
  36987.   
  36988.   #ifdef    SIGTSTP
  36989.       (void) signal (SIGTSTP, SIG_IGN);
  36990. ! #endif    SIGTSTP
  36991.   
  36992.       if (vmhtty != OK)
  36993.       return NOTOK;
  36994. --- 2307,2313 ----
  36995.   
  36996.   #ifdef    SIGTSTP
  36997.       (void) signal (SIGTSTP, SIG_IGN);
  36998. ! #endif    /* SIGTSTP */
  36999.   
  37000.       if (vmhtty != OK)
  37001.       return NOTOK;
  37002. *** ../mh-6.7.2/uip/mshcmds.c    Thu Jan 23 14:58:19 1992
  37003. --- uip/mshcmds.c    Mon Dec 14 16:21:27 1992
  37004. ***************
  37005. *** 1,7 ****
  37006.   /* mshcmds.c - command handlers in msh */
  37007.   #ifndef    lint
  37008. ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.7 1992/01/23 22:58:03 jromine Exp $";
  37009. ! #endif    lint
  37010.   
  37011.   #include "../h/mh.h"
  37012.   #include "../h/dropsbr.h"
  37013. --- 1,7 ----
  37014.   /* mshcmds.c - command handlers in msh */
  37015.   #ifndef    lint
  37016. ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.25 1992/12/15 00:20:22 jromine Exp $";
  37017. ! #endif    /* lint */
  37018.   
  37019.   #include "../h/mh.h"
  37020.   #include "../h/dropsbr.h"
  37021. ***************
  37022. *** 8,14 ****
  37023. --- 8,20 ----
  37024.   #include "../h/formatsbr.h"
  37025.   #include "../h/scansbr.h"
  37026.   #include "../zotnet/tws.h"
  37027. + #ifdef    _AIX        /* AIX 1.2.1 <stdio.h> declares getws() */
  37028. + #define getws _getws
  37029. + #endif
  37030.   #include <stdio.h>
  37031. + #ifdef    _AIX
  37032. + #undef getws
  37033. + #endif
  37034.   #include "../zotnet/mts.h"
  37035.   #include <ctype.h>
  37036.   #include <errno.h>
  37037. ***************
  37038. *** 33,38 ****
  37039. --- 39,47 ----
  37040.   void clear_screen ();
  37041.   static int     eom_action ();
  37042.   static FP    mhl_action ();
  37043. + #ifdef    MIME
  37044. + static int     nontext();
  37045. + #endif
  37046.   
  37047.   
  37048.   static burst(), forw(), rmm(), show(), ask(), copy_message(), copy_digest();
  37049. ***************
  37050. *** 42,47 ****
  37051. --- 51,66 ----
  37052.   static int    getws ();
  37053.   static char    *sosmash ();
  37054.   
  37055. + #if    defined(NNTP) && defined(MPOP)
  37056. + #undef    MPOP
  37057. + #endif
  37058. + #ifdef    MPOP
  37059. + #ifdef    BPOP
  37060. + extern    int    pmsh;
  37061. + extern    char    response[];
  37062. + #endif
  37063. + #endif /* MPOP */
  37064.   /*   */
  37065.   
  37066.   forkcmd (args, pgm)
  37067. ***************
  37068. *** 116,122 ****
  37069.   #define    DIHELP    12
  37070.       "help", 4,
  37071.   
  37072. !     NULL, NULL
  37073.   };
  37074.   
  37075.   /*   */
  37076. --- 135,141 ----
  37077.   #define    DIHELP    12
  37078.       "help", 4,
  37079.   
  37080. !     NULL, 0
  37081.   };
  37082.   
  37083.   /*   */
  37084. ***************
  37085. *** 222,228 ****
  37086.   #define    EXHELP    6
  37087.       "help", 4,
  37088.   
  37089. !     NULL, NULL
  37090.   };
  37091.   
  37092.   /*   */
  37093. --- 241,247 ----
  37094.   #define    EXHELP    6
  37095.       "help", 4,
  37096.   
  37097. !     NULL, 0
  37098.   };
  37099.   
  37100.   /*   */
  37101. ***************
  37102. *** 336,341 ****
  37103. --- 355,361 ----
  37104.               msgp;
  37105.       long    pos;
  37106.       char    c,
  37107. +         cc,
  37108.               buffer[BUFSIZ];
  37109.       register FILE *zp;
  37110.   
  37111. ***************
  37112. *** 347,353 ****
  37113.       }
  37114.   
  37115.       pos = ftell (zp = msh_ready (msgnum, 1));
  37116. !     for (msgp = 1; msgp <= MAXFOLDER;) {
  37117.       while (fgets (buffer, sizeof buffer, zp) != NULL
  37118.           && buffer[0] == '\n'
  37119.           && pos < Msgs[msgnum].m_stop)
  37120. --- 367,373 ----
  37121.       }
  37122.   
  37123.       pos = ftell (zp = msh_ready (msgnum, 1));
  37124. !     for (msgp = 0; msgp <= MAXFOLDER;) {
  37125.       while (fgets (buffer, sizeof buffer, zp) != NULL
  37126.           && buffer[0] == '\n'
  37127.           && pos < Msgs[msgnum].m_stop)
  37128. ***************
  37129. *** 357,369 ****
  37130.       (void) fseek (zp, pos, 0);
  37131.       smsgs[msgp].m_start = pos;
  37132.   
  37133. !     for (c = NULL;
  37134. !         fgets (buffer, sizeof buffer, zp) != NULL
  37135. !         && pos < Msgs[msgnum].m_stop;
  37136.           c = buffer[0])
  37137.           if (strncmp (buffer, delim3, ld3) == 0
  37138. !             && peekc (zp) == '\n'
  37139. !             && (msgp == 1 || c == '\n'))
  37140.           break;
  37141.           else
  37142.           pos += (long) strlen (buffer);
  37143. --- 377,389 ----
  37144.       (void) fseek (zp, pos, 0);
  37145.       smsgs[msgp].m_start = pos;
  37146.   
  37147. !     for (c = 0;
  37148. !         pos < Msgs[msgnum].m_stop
  37149. !         && fgets (buffer, sizeof buffer, zp) != NULL;
  37150.           c = buffer[0])
  37151.           if (strncmp (buffer, delim3, ld3) == 0
  37152. !             && (msgp == 1 || c == '\n')
  37153. !             && peekc (zp) == '\n')
  37154.           break;
  37155.           else
  37156.           pos += (long) strlen (buffer);
  37157. ***************
  37158. *** 370,387 ****
  37159.   
  37160.       wasdlm = strncmp (buffer, delim3, ld3) == 0;
  37161.       if (smsgs[msgp].m_start != pos)
  37162. !         smsgs[msgp++].m_stop = c == '\n' && wasdlm ? pos - 1 : pos;
  37163.       if (feof (zp) || pos >= Msgs[msgnum].m_stop) {
  37164. !         if (wasdlm) {
  37165.           smsgs[msgp - 1].m_stop -= ((long) strlen (buffer) + 1);
  37166. -         msgp++;        /* fake "End of XXX Digest" */
  37167. -         }
  37168.           break;
  37169.       }
  37170.       pos += (long) strlen (buffer);
  37171.       }
  37172.   
  37173. !     switch (--msgp) {        /* toss "End of XXX Digest" */
  37174.       case 0: 
  37175.           adios (NULLCP, "burst() botch -- you lose big");
  37176.   
  37177. --- 390,405 ----
  37178.   
  37179.       wasdlm = strncmp (buffer, delim3, ld3) == 0;
  37180.       if (smsgs[msgp].m_start != pos)
  37181. !         smsgs[msgp++].m_stop = (c == '\n' && wasdlm) ? pos - 1 : pos;
  37182.       if (feof (zp) || pos >= Msgs[msgnum].m_stop) {
  37183. !         if (wasdlm)
  37184.           smsgs[msgp - 1].m_stop -= ((long) strlen (buffer) + 1);
  37185.           break;
  37186.       }
  37187.       pos += (long) strlen (buffer);
  37188.       }
  37189.   
  37190. !     switch (msgp--) {        /* toss "End of XXX Digest" */
  37191.       case 0: 
  37192.           adios (NULLCP, "burst() botch -- you lose big");
  37193.   
  37194. ***************
  37195. *** 393,405 ****
  37196.       default: 
  37197.           if (verbosw)
  37198.           printf ("%d message%s exploded from digest %d\n",
  37199. !             msgp - 1, msgp - 1 != 1 ? "s" : "", msgnum);
  37200. !         if (msgp == 2)
  37201. !         msgp++;
  37202.           break;
  37203.       }
  37204.   
  37205. -     msgp--;
  37206.       if ((i = msgp + mp -> hghmsg) > MAXFOLDER) {
  37207.       advise (NULLCP, "more than %d messages", MAXFOLDER);
  37208.       return NOTOK;
  37209. --- 411,420 ----
  37210.       default: 
  37211.           if (verbosw)
  37212.           printf ("%d message%s exploded from digest %d\n",
  37213. !             msgp, msgp != 1 ? "s" : "", msgnum);
  37214.           break;
  37215.       }
  37216.   
  37217.       if ((i = msgp + mp -> hghmsg) > MAXFOLDER) {
  37218.       advise (NULLCP, "more than %d messages", MAXFOLDER);
  37219.       return NOTOK;
  37220. ***************
  37221. *** 408,419 ****
  37222.       adios (NULLCP, "unable to allocate folder storage");
  37223.   
  37224.       j = mp -> hghmsg;
  37225. !     mp -> hghmsg += msgp - 1;
  37226. !     mp -> nummsg += msgp - 1;
  37227.       if (mp -> hghsel > msgnum)
  37228. !     mp -> hghsel += msgp - 1;
  37229.   
  37230. !     if (inplace && msgp > 1)
  37231.       for (i = mp -> hghmsg; j > msgnum; i--, j--) {
  37232.           if (verbosw)
  37233.           printf ("message %d becomes message %d\n", j, i);
  37234. --- 423,434 ----
  37235.       adios (NULLCP, "unable to allocate folder storage");
  37236.   
  37237.       j = mp -> hghmsg;
  37238. !     mp -> hghmsg += msgp;
  37239. !     mp -> nummsg += msgp;
  37240.       if (mp -> hghsel > msgnum)
  37241. !     mp -> hghsel += msgp;
  37242.   
  37243. !     if (inplace)
  37244.       for (i = mp -> hghmsg; j > msgnum; i--, j--) {
  37245.           if (verbosw)
  37246.           printf ("message %d becomes message %d\n", j, i);
  37247. ***************
  37248. *** 434,441 ****
  37249.       (void) readid (msgnum);
  37250.   
  37251.       mp -> msgstats[msgnum] &= ~SELECTED;
  37252. !     i = inplace ? msgnum + msgp - 1 : mp -> hghmsg;
  37253. !     for (j = msgp; j >= (inplace ? 1 : 2); i--, j--) {
  37254.       if (verbosw && i != msgnum)
  37255.           printf ("message %d of digest %d becomes message %d\n",
  37256.               j, msgnum, i);
  37257. --- 449,456 ----
  37258.       (void) readid (msgnum);
  37259.   
  37260.       mp -> msgstats[msgnum] &= ~SELECTED;
  37261. !     i = inplace ? msgnum + msgp : mp -> hghmsg;
  37262. !     for (j = msgp; j >= (inplace ? 0 : 1); i--, j--) {
  37263.       if (verbosw && i != msgnum)
  37264.           printf ("message %d of digest %d becomes message %d\n",
  37265.               j, msgnum, i);
  37266. ***************
  37267. *** 475,481 ****
  37268.   #define    FIHELP    9
  37269.       "help", 4,
  37270.   
  37271. !     NULL, NULL
  37272.   };
  37273.   
  37274.   /*   */
  37275. --- 490,496 ----
  37276.   #define    FIHELP    9
  37277.       "help", 4,
  37278.   
  37279. !     NULL, 0
  37280.   };
  37281.   
  37282.   /*   */
  37283. ***************
  37284. *** 652,658 ****
  37285.   #define    FLHELP    15
  37286.       "help", 4,
  37287.   
  37288. !     NULL, NULL
  37289.   };
  37290.   
  37291.   /*   */
  37292. --- 667,673 ----
  37293.   #define    FLHELP    15
  37294.       "help", 4,
  37295.   
  37296. !     NULL, 0
  37297.   };
  37298.   
  37299.   /*   */
  37300. ***************
  37301. *** 737,743 ****
  37302.       }
  37303.   
  37304.       if (folder) {
  37305. !     if (*folder == NULL) {
  37306.           advise (NULLCP, "null folder names are not permitted");
  37307.           return;
  37308.       }
  37309. --- 752,758 ----
  37310.       }
  37311.   
  37312.       if (folder) {
  37313. !     if (*folder == 0) {
  37314.           advise (NULLCP, "null folder names are not permitted");
  37315.           return;
  37316.       }
  37317. ***************
  37318. *** 839,844 ****
  37319. --- 854,865 ----
  37320.   
  37321.   /*   */
  37322.   
  37323. + #ifndef    MIME
  37324. + #define    MIMEminc(a)    (a)
  37325. + #else    /* MIME */
  37326. + #define    MIMEminc(a)    0
  37327. + #endif    /* MIME */
  37328.   static struct swit forwswit[] = {
  37329.   #define    FOANSW    0
  37330.       "annotate", 0,
  37331. ***************
  37332. *** 866,879 ****
  37333.       "inplace", 0,
  37334.   #define    FONINSW    12
  37335.       "noinplace", 0,
  37336. ! #define    FOWHTSW    13
  37337.       "whatnowproc program", 0,
  37338. ! #define    FONWTSW    14
  37339.       "nowhatnow", 0,
  37340. ! #define    FOHELP    15
  37341.       "help", 4,
  37342.   
  37343. !     NULL, NULL
  37344.   };
  37345.   
  37346.   /*   */
  37347. --- 887,904 ----
  37348.       "inplace", 0,
  37349.   #define    FONINSW    12
  37350.       "noinplace", 0,
  37351. ! #define    FOMISW    13
  37352. !     "mime", MIMEminc(-4),
  37353. ! #define    FONMISW    14
  37354. !     "nomime", MIMEminc(-6),
  37355. ! #define    FOWHTSW    15
  37356.       "whatnowproc program", 0,
  37357. ! #define    FONWTSW    16
  37358.       "nowhatnow", 0,
  37359. ! #define    FOHELP    17
  37360.       "help", 4,
  37361.   
  37362. !     NULL, 0
  37363.   };
  37364.   
  37365.   /*   */
  37366. ***************
  37367. *** 913,918 ****
  37368. --- 938,945 ----
  37369.           case FONANSW: 
  37370.           case FOINSW: 
  37371.           case FONINSW: 
  37372. +         case FOMISW: 
  37373. +         case FONMISW: 
  37374.               continue;
  37375.   
  37376.           case FONDFSW:
  37377. ***************
  37378. *** 959,965 ****
  37379.   
  37380.                       /* foil search of .mh_profile */
  37381.       (void) sprintf (buf, "%sXXXXXX", invo_name);
  37382. !     vec[0] = mktemp (buf);
  37383.       vec[vecp++] = "-file";
  37384.       vec[vecp] = NULL;
  37385.       if (!msgp)
  37386. --- 986,992 ----
  37387.   
  37388.                       /* foil search of .mh_profile */
  37389.       (void) sprintf (buf, "%sXXXXXX", invo_name);
  37390. !     vec[0] = (char *)mktemp (buf);
  37391.       vec[vecp++] = "-file";
  37392.       vec[vecp] = NULL;
  37393.       if (!msgp)
  37394. ***************
  37395. *** 1151,1157 ****
  37396.   #define    MDBUGSW    9
  37397.       "debug", -5,
  37398.   
  37399. !     NULL, NULL
  37400.   };
  37401.   
  37402.   /*   */
  37403. --- 1178,1184 ----
  37404.   #define    MDBUGSW    9
  37405.       "debug", -5,
  37406.   
  37407. !     NULL, 0
  37408.   };
  37409.   
  37410.   /*   */
  37411. ***************
  37412. *** 1271,1280 ****
  37413.   #ifndef    MTR
  37414.       printf ("lowoff=%d hghoff=%d\n",
  37415.           mp -> lowoff, mp -> hghoff);
  37416. ! #else    MTR
  37417.       printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
  37418.           mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
  37419. ! #endif    MTR
  37420.       }
  37421.   
  37422.       if (seqp == 0 && (addsw || deletesw)) {
  37423. --- 1298,1307 ----
  37424.   #ifndef    MTR
  37425.       printf ("lowoff=%d hghoff=%d\n",
  37426.           mp -> lowoff, mp -> hghoff);
  37427. ! #else    /* MTR */
  37428.       printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
  37429.           mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
  37430. ! #endif    /* MTR */
  37431.       }
  37432.   
  37433.       if (seqp == 0 && (addsw || deletesw)) {
  37434. ***************
  37435. *** 1340,1345 ****
  37436. --- 1367,1542 ----
  37437.   
  37438.   /*   */
  37439.   
  37440. + #ifdef MIME
  37441. + static struct swit mhnswit[] = {
  37442. + #define    MHNAUTOSW      0
  37443. +     "auto", 0,
  37444. + #define    MHNNAUTOSW      1
  37445. +     "noauto", 0,
  37446. + #define    MHNDEBUGSW      2
  37447. +     "debug", -5,
  37448. + #define    MHNEBCDICSW      3
  37449. +     "ebcdicsafe", 0,
  37450. + #define    MHNNEBCDICSW     4
  37451. +     "noebcdicsafe", 0,
  37452. + #define    MHNFORMSW      5
  37453. +     "form formfile", 4,
  37454. + #define    MHNHEADSW      6
  37455. +     "headers", 0,
  37456. + #define    MHNNHEADSW      7
  37457. +     "noheaders", 0,
  37458. + #define    MHNLISTSW      8
  37459. +     "list", 0,
  37460. + #define    MHNNLISTSW      9
  37461. +     "nolist", 0,
  37462. + #define    MHNPARTSW     10
  37463. +     "part number", 0,
  37464. + #define    MHNSIZESW     11
  37465. +     "realsize", 0,
  37466. + #define    MHNNSIZESW     12
  37467. +     "norealsize", 0,
  37468. + #define    MHNRFC934SW     13
  37469. +     "rfc934mode", 0,
  37470. + #define    MHNNRFC934SW     14
  37471. +     "norfc934mode", 0,
  37472. + #define    MHNSERIALSW     15
  37473. +     "serialonly", 0,
  37474. + #define    MHNNSERIALSW     16
  37475. +     "noserialonly", 0,
  37476. + #define    MHNSHOWSW     17
  37477. +     "show", 0,
  37478. + #define    MHNNSHOWSW     18
  37479. +     "noshow", 0,
  37480. + #define    MHNSTORESW     19
  37481. +     "store", 0,
  37482. + #define    MHNNSTORESW     20
  37483. +     "nostore", 0,
  37484. + #define    MHNTYPESW     21
  37485. +     "type content", 0,
  37486. + #define    MHNVERBSW     22
  37487. +     "verbose", 0,
  37488. + #define    MHNNVERBSW     23
  37489. +     "noverbose", 0,
  37490. + #define    MHNHELPSW     24
  37491. +     "help", 4,
  37492. + #define    MHNPROGSW     25
  37493. +     "moreproc program", -4,
  37494. + #define    MHNNPROGSW     26
  37495. +     "nomoreproc", -3,
  37496. + #define    MHNLENSW     27
  37497. +     "length lines", -4,
  37498. + #define    MHNWIDSW     28
  37499. +     "width columns", -4,
  37500. +     NULL, 0
  37501. + };
  37502. + /*   */
  37503. + mhncmd (args)
  37504. + char  **args;
  37505. + {
  37506. +     int     msgp = 0,
  37507. +         vecp = 1,
  37508. +         i,
  37509. +         msgnum;
  37510. +     char   *cp,
  37511. +             buf[BUFSIZ],
  37512. +        *msgs[MAXARGS],
  37513. +            *vec[MAXARGS];
  37514. +     if (fmsh) {
  37515. +     forkcmd (args, cmd_name);
  37516. +     return;
  37517. +     }
  37518. +     while (cp = *args++) {
  37519. +     if (*cp == '-')
  37520. +         switch (smatch (++cp, mhnswit)) {
  37521. +         case AMBIGSW: 
  37522. +             ambigsw (cp, mhnswit);
  37523. +             return;
  37524. +         case UNKWNSW: 
  37525. +             fprintf (stderr, "-%s unknown\n", cp);
  37526. +             return;
  37527. +         case MHNHELPSW:
  37528. +             (void) sprintf (buf, "%s [msgs] [switches]", cmd_name);
  37529. +             help (buf, mhnswit);
  37530. +             return;
  37531. +         case MHNAUTOSW:
  37532. +         case MHNNAUTOSW:
  37533. +         case MHNDEBUGSW:
  37534. +         case MHNEBCDICSW:
  37535. +         case MHNNEBCDICSW:
  37536. +         case MHNHEADSW:
  37537. +         case MHNNHEADSW:
  37538. +         case MHNLISTSW:
  37539. +         case MHNNLISTSW:
  37540. +         case MHNSIZESW:
  37541. +         case MHNNSIZESW:
  37542. +         case MHNRFC934SW:
  37543. +         case MHNNRFC934SW:
  37544. +         case MHNSERIALSW:
  37545. +         case MHNNSERIALSW:
  37546. +         case MHNSHOWSW:
  37547. +         case MHNNSHOWSW:
  37548. +         case MHNSTORESW:
  37549. +         case MHNNSTORESW:
  37550. +         case MHNVERBSW:
  37551. +         case MHNNVERBSW:
  37552. +         case MHNNPROGSW:
  37553. +             vec[vecp++] = --cp;
  37554. +             continue;
  37555. +         case MHNFORMSW:
  37556. +         case MHNPARTSW:
  37557. +         case MHNTYPESW:
  37558. +         case MHNPROGSW:
  37559. +         case MHNLENSW:
  37560. +         case MHNWIDSW:
  37561. +             vec[vecp++] = --cp;
  37562. +             if (!(cp = *args++) || *cp == '-') {
  37563. +             advise (NULLCP, "missing argument to %s", args[-2]);
  37564. +             return;
  37565. +             }
  37566. +             vec[vecp++] = cp;
  37567. +             continue;
  37568. +         }
  37569. +     if (*cp == '+' || *cp == '@') {
  37570. +         advise (NULLCP, "sorry, no folders allowed!");
  37571. +         return;
  37572. +     }
  37573. +     else
  37574. +         msgs[msgp++] = cp;
  37575. +     }
  37576. +     vec[0] = cmd_name;
  37577. +     vec[vecp++] = "-file";
  37578. +     vec[vecp] = NULL;
  37579. +     if (!msgp)
  37580. +     msgs[msgp++] = "cur";
  37581. +     for (msgnum = 0; msgnum < msgp; msgnum++)
  37582. +     if (!m_convert (mp, msgs[msgnum]))
  37583. +         return;
  37584. +     m_setseq (mp);
  37585. +     interrupted = 0;
  37586. +     for (msgnum = mp -> lowsel;
  37587. +         msgnum <= mp -> hghsel && !interrupted;
  37588. +         msgnum++)
  37589. +     if (mp -> msgstats[msgnum] & SELECTED)
  37590. +         if (process (msgnum, cmd_name, vecp, vec)) {
  37591. +         mp -> msgstats[msgnum] &= ~SELECTED;
  37592. +         mp -> numsel--;
  37593. +         }
  37594. +     m_setcur (mp, mp -> hghsel);
  37595. + }
  37596. + /*   */
  37597. + #endif /* MIME */
  37598.   static struct swit packswit[] = {
  37599.   #define    PAFISW    0
  37600.       "file name", 0,
  37601. ***************
  37602. *** 1347,1353 ****
  37603.   #define    PAHELP    1
  37604.       "help", 4,
  37605.   
  37606. !     NULL, NULL
  37607.   };
  37608.   
  37609.   /*   */
  37610. --- 1544,1550 ----
  37611.   #define    PAHELP    1
  37612.       "help", 4,
  37613.   
  37614. !     NULL, 0
  37615.   };
  37616.   
  37617.   /*   */
  37618. ***************
  37619. *** 1537,1543 ****
  37620.   #define    PIHELP    22
  37621.       "help", 4,
  37622.   
  37623. !     NULL, NULL
  37624.   };
  37625.   
  37626.   /*   */
  37627. --- 1734,1740 ----
  37628.   #define    PIHELP    22
  37629.       "help", 4,
  37630.   
  37631. !     NULL, 0
  37632.   };
  37633.   
  37634.   /*   */
  37635. ***************
  37636. *** 1740,1746 ****
  37637.   #define    REHELP    20
  37638.       "help", 4,
  37639.   
  37640. !     NULL, NULL
  37641.   };
  37642.   
  37643.   /*   */
  37644. --- 1937,1943 ----
  37645.   #define    REHELP    20
  37646.       "help", 4,
  37647.   
  37648. !     NULL, 0
  37649.   };
  37650.   
  37651.   /*   */
  37652. ***************
  37653. *** 1841,1847 ****
  37654.   #define    RMHELP    0
  37655.       "help", 4,
  37656.   
  37657. !     NULL, NULL
  37658.   };
  37659.   
  37660.   /*   */
  37661. --- 2038,2044 ----
  37662.   #define    RMHELP    0
  37663.       "help", 4,
  37664.   
  37665. !     NULL, 0
  37666.   };
  37667.   
  37668.   /*   */
  37669. ***************
  37670. *** 1925,1930 ****
  37671. --- 2122,2133 ----
  37672.       if (mp -> msgstats[msgnum] & SELECTED) {
  37673.           mp -> msgstats[msgnum] |= DELETED;
  37674.           mp -> msgstats[msgnum] &= ~EXISTS;
  37675. + #ifdef    MPOP
  37676. + #ifdef    BPOP
  37677. +         if (pmsh && pop_dele (msgnum) != OK)
  37678. +         fprintf (stderr, "%s", response);
  37679. + #endif
  37680. + #endif /* MPOP */
  37681.       }
  37682.   
  37683.       if ((mp -> nummsg -= mp -> numsel) <= 0) {
  37684. ***************
  37685. *** 1971,1977 ****
  37686.   #define    SCHELP    7
  37687.       "help", 4,
  37688.   
  37689. !     NULL, NULL
  37690.   };
  37691.   
  37692.   /*   */
  37693. --- 2174,2180 ----
  37694.   #define    SCHELP    7
  37695.       "help", 4,
  37696.   
  37697. !     NULL, 0
  37698.   };
  37699.   
  37700.   /*   */
  37701. ***************
  37702. *** 1995,2000 ****
  37703. --- 2198,2208 ----
  37704.          *nfs,
  37705.              *msgs[MAXARGS];
  37706.       register FILE *zp;
  37707. + #ifdef    MPOP
  37708. + #ifdef    BPOP
  37709. +     static int p_optim = 0;
  37710. + #endif
  37711. + #endif /* MPOP */
  37712.       static int s_optim = 0;
  37713.       static char *s_form = NULL,
  37714.           *s_format = NULL;
  37715. ***************
  37716. *** 2072,2081 ****
  37717. --- 2280,2362 ----
  37718.       s_optim = optim = 1;
  37719.       s_form = form ? getcpy (form) : NULL;
  37720.       s_format = format ? getcpy (format) : NULL;
  37721. + #ifdef    MPOP
  37722. + #ifdef    BPOP
  37723. +     if (pmsh) {
  37724. +         int        i;
  37725. +         char   *dp,
  37726. +            *ep,
  37727. +            *fp;
  37728. +         if (width == 0)
  37729. +         width = sc_width ();
  37730. +         for (dp = nfs, i = 0; *dp; dp++, i++)
  37731. +         if (*dp == '\\' || *dp == '"' || *dp == '\n')
  37732. +             i++;
  37733. +         i++;
  37734. +         if ((ep = malloc ((unsigned) i)) == NULL)
  37735. +         adios (NULLCP, "out of memory");
  37736. +         for (dp = nfs, fp = ep; *dp; dp++) {
  37737. +         if (*dp == '\n') {
  37738. +             *fp++ = '\\', *fp++ = 'n';
  37739. +             continue;
  37740. +         }
  37741. +         if (*dp == '"' || *dp == '\\')
  37742. +             *fp++ = '\\';
  37743. +         *fp++ = *dp;
  37744. +         }
  37745. +         *fp = NULL;
  37746. +         if (pop_command ("XTND SCAN %d \"%s\"", width, ep) == OK)
  37747. +         p_optim = 1;
  37748. +         free (ep);
  37749. +     }
  37750. + #endif
  37751. + #endif    /* MPOP */
  37752.       }
  37753.       else
  37754.       optim = equiv (s_form, form) && equiv (s_format, format);
  37755.   
  37756. + #ifdef    MPOP
  37757. + #ifdef    BPOP
  37758. +     if (p_optim && optim) {
  37759. +     for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
  37760. +         if (!(mp -> msgstats[msgnum] & SELECTED) || Msgs[msgnum].m_scanl)
  37761. +         break;
  37762. +     if (msgnum > mp -> hghmsg && pop_command ("LIST") == OK) {
  37763. +         fprintf (stderr, "Stand-by...");
  37764. +         fflush (stderr);
  37765. +         for (;;) {
  37766. +         int    size;
  37767. +         switch (pop_multiline ()) {
  37768. +             case NOTOK:
  37769. +                 fprintf (stderr, "%s", response);
  37770. +                 /* and fall... */
  37771. +             case DONE:
  37772. +                 fprintf (stderr,"\n");
  37773. +                 break;
  37774. +             case OK:
  37775. +             if (sscanf (response, "%d %d", &msgnum, &size) == 2
  37776. +                     && mp -> lowmsg <= msgnum
  37777. +                     && msgnum <= mp -> hghmsg
  37778. +                     && (cp = index (response, '#'))
  37779. +                     && *++cp)
  37780. +                 Msgs[msgnum].m_scanl = concat (cp, "\n", NULLCP);
  37781. +             continue;
  37782. +         }
  37783. +         break;
  37784. +         }
  37785. +     }
  37786. +     }
  37787. + #endif
  37788. + #endif /* MPOP */
  37789.       interrupted = 0;
  37790.       for (msgnum = mp -> lowsel;
  37791.           msgnum <= mp -> hghsel && !interrupted;
  37792. ***************
  37793. *** 2084,2092 ****
  37794.           if (optim && Msgs[msgnum].m_scanl)
  37795.           printf ("%s", Msgs[msgnum].m_scanl);
  37796.           else {
  37797.           zp = msh_ready (msgnum, 0);
  37798.           switch (state = scan (zp, msgnum, 0, nfs, width,
  37799. !             msgnum == mp -> curmsg, 
  37800.               headersw ? (fmsh ? fmsh : mp -> foldpath) : (char *)0,
  37801.               fmsh ? 0L : (long) (Msgs[msgnum].m_stop - Msgs[msgnum].m_start),
  37802.               1)) {
  37803. --- 2365,2389 ----
  37804.           if (optim && Msgs[msgnum].m_scanl)
  37805.           printf ("%s", Msgs[msgnum].m_scanl);
  37806.           else {
  37807. + #ifdef    MPOP
  37808. + #ifdef    BPOP
  37809. +         if (p_optim
  37810. +                 && optim
  37811. +             && (mp -> msgstats[msgnum] & VIRTUAL)
  37812. +                 && pop_command ("LIST %d", msgnum) == OK
  37813. +             && (cp = index (response, '#'))
  37814. +                 && *++cp) {
  37815. +             Msgs[msgnum].m_scanl = concat (cp, "\n", NULLCP);
  37816. +             printf ("%s", Msgs[msgnum].m_scanl);            
  37817. +             continue;
  37818. +         }
  37819. + #endif
  37820. + #endif /* MPOP */
  37821.           zp = msh_ready (msgnum, 0);
  37822.           switch (state = scan (zp, msgnum, 0, nfs, width,
  37823. !             msgnum == mp -> curmsg,
  37824. !             mp -> msgstats[msgnum] & UNSEEN,    /* ?? */
  37825.               headersw ? (fmsh ? fmsh : mp -> foldpath) : (char *)0,
  37826.               fmsh ? 0L : (long) (Msgs[msgnum].m_stop - Msgs[msgnum].m_start),
  37827.               1)) {
  37828. ***************
  37829. *** 2139,2145 ****
  37830.   #define    SHHELP    10
  37831.       "help", 4,
  37832.   
  37833. !     NULL, NULL
  37834.   };
  37835.   
  37836.   /*   */
  37837. --- 2436,2442 ----
  37838.   #define    SHHELP    10
  37839.       "help", 4,
  37840.   
  37841. !     NULL, 0
  37842.   };
  37843.   
  37844.   /*   */
  37845. ***************
  37846. *** 2239,2244 ****
  37847. --- 2536,2553 ----
  37848.           return;
  37849.       m_setseq (mp);
  37850.   
  37851. + #ifdef    MIME
  37852. +     if (!nshow && !getenv ("NOMHNPROC"))
  37853. +     for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
  37854. +         if ((mp -> msgstats[msgnum] & SELECTED) && nontext (msgnum)) {
  37855. +         proc = (cp = m_find ("mhnproc")) ? cp : "mhn";
  37856. +         vec[vecp++] = "-show";
  37857. +         vec[vecp++] = "-file";
  37858. +         vec[vecp] = NULL;
  37859. +         goto finish;
  37860. +         }
  37861. + #endif    /* MIME */
  37862.       if (nshow)
  37863.       proc = "cat";
  37864.       else
  37865. ***************
  37866. *** 2247,2252 ****
  37867. --- 2556,2562 ----
  37868.           mhl++;
  37869.       }
  37870.   
  37871. + finish: ;
  37872.       seen = m_seqflag (mp, "unseen");
  37873.       vec[0] = r1bindex (proc, '/');
  37874.       if (mhl) {
  37875. ***************
  37876. *** 2356,2365 ****
  37877.       printf ("Press <return> to list \"%d\"...", msgnum);
  37878.       }
  37879.       (void) fflush (stdout);
  37880. !     buf[0] = NULL;
  37881.   #ifndef    BSD42
  37882.       (void) read (fileno (stdout), buf, sizeof buf);
  37883. ! #else    BSD42
  37884.       switch (setjmp (sigenv)) {
  37885.       case OK: 
  37886.           should_intr = 1;
  37887. --- 2666,2675 ----
  37888.       printf ("Press <return> to list \"%d\"...", msgnum);
  37889.       }
  37890.       (void) fflush (stdout);
  37891. !     buf[0] = 0;
  37892.   #ifndef    BSD42
  37893.       (void) read (fileno (stdout), buf, sizeof buf);
  37894. ! #else    /* BSD42 */
  37895.       switch (setjmp (sigenv)) {
  37896.       case OK: 
  37897.           should_intr = 1;
  37898. ***************
  37899. *** 2369,2375 ****
  37900.           should_intr = 0;
  37901.           break;
  37902.       }
  37903. ! #endif    BSD42
  37904.       if (index (buf, '\n') == NULL)
  37905.       (void) putchar ('\n');
  37906.   
  37907. --- 2679,2685 ----
  37908.           should_intr = 0;
  37909.           break;
  37910.       }
  37911. ! #endif    /* BSD42 */
  37912.       if (index (buf, '\n') == NULL)
  37913.       (void) putchar ('\n');
  37914.   
  37915. ***************
  37916. *** 2387,2392 ****
  37917. --- 2697,2860 ----
  37918.   
  37919.   /*   */
  37920.   
  37921. + #ifdef    MIME
  37922. + #include "../h/mhn.h"
  37923. + static int  nontext (msgnum)
  37924. + int    msgnum;
  37925. + {
  37926. +     int        result,
  37927. +         state;
  37928. +     register char   *bp,
  37929. +             *dp;
  37930. +     char   *cp,
  37931. +         buf[BUFSIZ],
  37932. +         name[NAMESZ];
  37933. +     FILE   *fp;
  37934. +     if (Msgs[msgnum].m_flags & MHNCHK)
  37935. +     return (Msgs[msgnum].m_flags & MHNYES);
  37936. +     Msgs[msgnum].m_flags |= MHNCHK;
  37937. +     fp = msh_ready (msgnum, 1);
  37938. +     for (state = FLD;;)
  37939. +     switch (state = m_getfld (state, name, buf, sizeof buf, fp)) {
  37940. +         case FLD:
  37941. +         case FLDPLUS:
  37942. +         case FLDEOF:
  37943. +             if (uleq (name, TYPE_FIELD)) {
  37944. +             int        passno;
  37945. +             char    c;
  37946. +             cp = add (buf, NULLCP);
  37947. +             while (state == FLDPLUS) {
  37948. +             state = m_getfld (state, name, buf, sizeof buf, fp);
  37949. +             cp = add (buf, cp);
  37950. +             }
  37951. +             bp = cp;
  37952. +             passno = 1;
  37953. + again: ;
  37954. +             for (; isspace (*bp); bp++)
  37955. +             continue;
  37956. +             if (*bp == '(') {
  37957. +             int    i;
  37958. +             for (bp++, i = 0;;) {
  37959. +                 switch (*bp++) {
  37960. +                 case '\0':
  37961. + invalid: ;
  37962. +                     result = 0;
  37963. +                     goto out;
  37964. +                 case '\\':
  37965. +                     if (*bp++ == '\0')
  37966. +                     goto invalid;
  37967. +                         continue;
  37968. +                 case '(':
  37969. +                         i++;
  37970. +                         /* and fall... */
  37971. +                     default:
  37972. +                         continue;
  37973. +                     case ')':
  37974. +                         if (--i < 0)
  37975. +                     break;
  37976. +                 continue;
  37977. +                 }
  37978. +                 break;
  37979. +             }
  37980. +             }
  37981. +             if (passno == 2) {
  37982. +             if (*bp != '/')
  37983. +                 goto invalid;
  37984. +             bp++;
  37985. +             passno = 3;
  37986. +             goto again;
  37987. +             }
  37988. +             for (dp = bp; istoken (*dp); dp++)
  37989. +             continue;
  37990. +             c = *dp, *dp = NULL;
  37991. +             if (*bp == NULL)
  37992. +             goto invalid;
  37993. +             if (passno > 1) {
  37994. +             if (result = !uleq (bp, "plain"))
  37995. +                 goto out;
  37996. +             *dp = c;
  37997. +             for (dp++; isspace (*dp); dp++)
  37998. +                 continue;
  37999. +             if (result = !uprf (dp, "charset"))
  38000. +                 goto out;
  38001. +             dp += sizeof "charset" - 1;
  38002. +             while (isspace (*dp))
  38003. +                 dp++;
  38004. +             if (*dp++ != '=')
  38005. +                 goto invalid;
  38006. +             while (isspace (*dp))
  38007. +                 dp++;
  38008. +             if (*dp == '"') {
  38009. +                 dp++;
  38010. +                 if (strlen (dp) >= sizeof "us-ascii\""
  38011. +                     && *(bp = dp + sizeof "us-ascii" - 1)=='"')
  38012. +                 *bp = NULL;
  38013. +             }
  38014. +             else
  38015. +                 if (strlen (dp) >= sizeof "us-ascii"
  38016. +                     && isspace (*(bp =
  38017. +                         dp + sizeof "us-ascii" - 1)))
  38018. +                 *bp = NULL;
  38019. +             result = !uleq (dp, "us-ascii");
  38020. +             }
  38021. +             else
  38022. +             if (!(result = !uleq (bp, "text"))) {
  38023. +                 *dp = c;
  38024. +                 bp = dp;
  38025. +                 passno = 2;
  38026. +                 goto again;
  38027. +             }
  38028. + out: ;
  38029. +             free (cp);
  38030. +             if (result) {
  38031. +             Msgs[msgnum].m_flags |= MHNYES;
  38032. +             return result;
  38033. +             }
  38034. +             break;
  38035. +         }
  38036. +             if (uleq (name, ENCODING_FIELD)) {
  38037. +             cp = add (buf, NULLCP);
  38038. +             while (state == FLDPLUS) {
  38039. +             state = m_getfld (state, name, buf, sizeof buf, fp);
  38040. +             cp = add (buf, cp);
  38041. +             }
  38042. +             for (bp = cp; isspace (*bp); bp++)
  38043. +             continue;
  38044. +             for (dp = bp; istoken (*dp); dp++)
  38045. +             continue;
  38046. +             *dp = NULL;
  38047. +             if (result = !uleq (bp, "7bit"))
  38048. +                 Msgs[msgnum].m_flags |= MHNYES;
  38049. +             free (cp);
  38050. +             if (result) {
  38051. +             Msgs[msgnum].m_flags |= MHNYES;
  38052. +             return result;
  38053. +             }
  38054. +             break;
  38055. +         }
  38056. +         while (state == FLDPLUS)
  38057. +             state = m_getfld (state, name, buf, sizeof buf, fp);
  38058. +         break;
  38059. +         default:
  38060. +         return 0;
  38061. +     }
  38062. + }
  38063. + #endif    /* MIME */
  38064. + /*   */
  38065.   static struct swit sortswit[] = {
  38066.   #define    SODATE    0
  38067.       "datefield field", 0,
  38068. ***************
  38069. *** 2405,2411 ****
  38070.   #define    SOHELP    7
  38071.       "help", 4,
  38072.   
  38073. !     NULL, NULL
  38074.   };
  38075.   
  38076.   /*   */
  38077. --- 2873,2879 ----
  38078.   #define    SOHELP    7
  38079.       "help", 4,
  38080.   
  38081. !     NULL, 0
  38082.   };
  38083.   
  38084.   /*   */
  38085. ***************
  38086. *** 2656,2665 ****
  38087.       cp = s;
  38088.       dp = s;    /* dst pointer */
  38089.       if (uleq (subj, "subject"))
  38090. !         while (c = *cp++) {
  38091.           if (! isspace(c)) {
  38092. !             if ((c == 'R' || c == 'r') &&
  38093. !                 (cp[0] == 'e' || cp[0] == 'E') && cp[1] == ':')
  38094.               cp += 2;
  38095.               else {
  38096.               if (isalnum(c))
  38097. --- 3124,3132 ----
  38098.       cp = s;
  38099.       dp = s;    /* dst pointer */
  38100.       if (uleq (subj, "subject"))
  38101. !         while (c = *cp) {
  38102.           if (! isspace(c)) {
  38103. !             if(uprf(cp, "re:"))
  38104.               cp += 2;
  38105.               else {
  38106.               if (isalnum(c))
  38107. ***************
  38108. *** 2667,2672 ****
  38109. --- 3134,3140 ----
  38110.               break;
  38111.               }
  38112.           }
  38113. +         cp++;
  38114.           }
  38115.       while (c = *cp++) {
  38116.           if (isalnum(c))
  38117. *** ../mh-6.7.2/uip/packf.c    Thu Oct 29 15:02:34 1987
  38118. --- uip/packf.c    Mon Dec 14 16:21:27 1992
  38119. ***************
  38120. *** 1,4 ****
  38121. --- 1,7 ----
  38122.   /* packf.c - pack a folder (used to be called "pack") */
  38123. + #ifndef lint
  38124. + static char ident[] = "@(#)$Id: packf.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  38125. + #endif    /*  lint */
  38126.   
  38127.   #include "../h/mh.h"
  38128.   #include "../h/dropsbr.h"
  38129. ***************
  38130. *** 6,11 ****
  38131. --- 9,17 ----
  38132.   #include <stdio.h>
  38133.   #include <sys/types.h>
  38134.   #include <sys/stat.h>
  38135. + #ifdef LOCALE
  38136. + #include    <locale.h>
  38137. + #endif
  38138.   
  38139.   /*   */
  38140.   
  38141. ***************
  38142. *** 16,22 ****
  38143.   #define    HELPSW    1
  38144.       "help", 4,
  38145.   
  38146. !     NULL, NULL
  38147.   };
  38148.   
  38149.   /*   */
  38150. --- 22,28 ----
  38151.   #define    HELPSW    1
  38152.       "help", 4,
  38153.   
  38154. !     NULL, 0
  38155.   };
  38156.   
  38157.   /*   */
  38158. ***************
  38159. *** 51,56 ****
  38160. --- 57,65 ----
  38161.       struct msgs *mp;
  38162.       struct stat st;
  38163.   
  38164. + #ifdef LOCALE
  38165. +     setlocale(LC_ALL, "");
  38166. + #endif
  38167.       invo_name = r1bindex (argv[0], '/');
  38168.       if ((cp = m_find (invo_name)) != NULL) {
  38169.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  38170. *** ../mh-6.7.2/uip/pick.c    Thu Oct 29 15:02:35 1987
  38171. --- uip/pick.c    Mon Dec 14 16:21:28 1992
  38172. ***************
  38173. *** 1,8 ****
  38174. --- 1,14 ----
  38175.   /* pick.c - select messages by content */
  38176. + #ifndef lint
  38177. + static char ident[] = "@(#)$Id: pick.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
  38178. + #endif    /*  lint */
  38179.   
  38180.   #include "../h/mh.h"
  38181.   #include "../zotnet/tws.h"
  38182.   #include <stdio.h>
  38183. + #ifdef LOCALE
  38184. + #include    <locale.h>
  38185. + #endif
  38186.   
  38187.   /*   */
  38188.   
  38189. ***************
  38190. *** 58,64 ****
  38191.   #define    HELPSW    22
  38192.       "help", 4,
  38193.   
  38194. !     NULL, NULL
  38195.   };
  38196.   
  38197.   /*   */
  38198. --- 64,70 ----
  38199.   #define    HELPSW    22
  38200.       "help", 4,
  38201.   
  38202. !     NULL, 0
  38203.   };
  38204.   
  38205.   /*   */
  38206. ***************
  38207. *** 93,98 ****
  38208. --- 99,107 ----
  38209.       struct msgs *mp;
  38210.       register FILE *fp;
  38211.   
  38212. + #ifdef LOCALE
  38213. +     setlocale(LC_ALL, "");
  38214. + #endif
  38215.       invo_name = r1bindex (argv[0], '/');
  38216.       if ((cp = m_find (invo_name)) != NULL) {
  38217.       ap = brkstring (cp = getcpy (cp), " ", "\n");
  38218. *** ../mh-6.7.2/uip/picksbr.c    Thu Apr  5 16:03:46 1990
  38219. --- uip/picksbr.c    Mon Dec 14 16:21:29 1992
  38220. ***************
  38221. *** 1,7 ****
  38222.   /* picksbr.c - routines to help pick along... */
  38223.   #ifndef    lint
  38224. ! static char ident[] = "@(#)$Id: picksbr.c,v 1.5 90/04/05 15:01:50 sources Exp $";
  38225. ! #endif    lint
  38226.   
  38227.   #include "../h/mh.h"
  38228.   #include "../zotnet/tws.h"
  38229. --- 1,7 ----
  38230.   /* picksbr.c - routines to help pick along... */
  38231.   #ifndef    lint
  38232. ! static char ident[] = "@(#)$Id: picksbr.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
  38233. ! #endif    /* lint */
  38234.   
  38235.   #include "../h/mh.h"
  38236.   #include "../zotnet/tws.h"
  38237. ***************
  38238. *** 43,49 ****
  38239.   #define    PRDATF    14
  38240.       "datefield field", 5,
  38241.   
  38242. !     NULL, NULL
  38243.   };
  38244.   
  38245.   /*     DEFINITIONS FOR PATTERN MATCHING */
  38246. --- 43,49 ----
  38247.   #define    PRDATF    14
  38248.       "datefield field", 5,
  38249.   
  38250. !     NULL, 0
  38251.   };
  38252.   
  38253.   /*     DEFINITIONS FOR PATTERN MATCHING */
  38254. ***************
  38255. *** 668,674 ****
  38256.           *p1++ = c;
  38257.       }
  38258.   
  38259. !     *p1++ = NULL;
  38260.       cbp = p2;
  38261.       p1 = linebuf;
  38262.       p2 = n -> n_expbuf;
  38263. --- 668,674 ----
  38264.           *p1++ = c;
  38265.       }
  38266.   
  38267. !     *p1++ = 0;
  38268.       cbp = p2;
  38269.       p1 = linebuf;
  38270.       p2 = n -> n_expbuf;
  38271. ***************
  38272. *** 844,855 ****
  38273.       if ((tw = dparsetime (buffer)) != NULL)
  38274.       return tw;
  38275.   
  38276. !     (void) sprintf (buffer, "%02d %s %02d %s",
  38277.           ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year, ap);
  38278.       if ((tw = dparsetime (buffer)) != NULL)
  38279.       return tw;
  38280.   
  38281. !     (void) sprintf (buffer, "%02d %s %02d %s %s",
  38282.           ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year,
  38283.           ap, dtwszone (ts));
  38284.       if ((tw = dparsetime (buffer)) != NULL)
  38285. --- 844,855 ----
  38286.       if ((tw = dparsetime (buffer)) != NULL)
  38287.       return tw;
  38288.   
  38289. !     (void) sprintf (buffer, "%02d %s %04d %s",
  38290.           ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year, ap);
  38291.       if ((tw = dparsetime (buffer)) != NULL)
  38292.       return tw;
  38293.   
  38294. !     (void) sprintf (buffer, "%02d %s %04d %s %s",
  38295.           ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year,
  38296.           ap, dtwszone (ts));
  38297.       if ((tw = dparsetime (buffer)) != NULL)
  38298. *** /dev/null    Tue Dec 15 08:01:10 1992
  38299. --- uip/popi.c    Wed Oct 28 13:34:36 1992
  38300. ***************
  38301. *** 0 ****
  38302. --- 1,685 ----
  38303. + /* popi.c - POP initiator - for MPOP */
  38304. + #ifndef    lint
  38305. + static char ident[] = "@(#)$Id: popi.c,v 1.8 1992/10/28 18:52:45 jromine Exp $";
  38306. + #endif    lint
  38307. + #include "../h/mh.h"
  38308. + #include "../h/formatsbr.h"
  38309. + #include "../h/scansbr.h"
  38310. + #include <errno.h>
  38311. + #include <stdio.h>
  38312. + #include <sys/types.h>
  38313. + #ifdef    SMTP
  38314. + #include "../h/local.h"
  38315. + #else    /* SMTP */
  38316. + #include <sys/stat.h>
  38317. + #endif    /* SMTP */
  38318. + #include "../zotnet/mts.h"
  38319. + /*   */
  38320. + #ifndef    RPOP
  38321. + #define    RPOPminc(a)    (a)
  38322. + #else
  38323. + #define    RPOPminc(a)    0
  38324. + #endif
  38325. + #ifndef    APOP
  38326. + #define    APOPminc(a)    (a)
  38327. + #else
  38328. + #define    APOPminc(a)    0
  38329. + #endif
  38330. + #ifndef    BPOP
  38331. + #define    BPOPminc(a)    (a)
  38332. + #else
  38333. + #define    BPOPminc(a)    0
  38334. + #endif
  38335. + #ifndef    SMTP
  38336. + #define    BULKminc(a)    (a)
  38337. + #else
  38338. + #define    BULKminc(a)    0
  38339. + #endif
  38340. + static struct swit  switches[] = {
  38341. + #define    APOPSW    0
  38342. +     "apop", APOPminc (-4),
  38343. + #define    NAPOPSW    1
  38344. +     "noapop", APOPminc (-6),
  38345. + #define    AUTOSW    2
  38346. +     "auto", BPOPminc(-4),
  38347. + #define    NAUTOSW    3
  38348. +     "noauto", BPOPminc(-6),
  38349. + #define    BULKSW    4
  38350. +     "bulk directory", BULKminc(-4),
  38351. + #define    FORMSW    5
  38352. +     "form formatfile", 0,
  38353. + #define    FMTSW    6
  38354. +     "format string", 5,
  38355. + #define    HOSTSW    7
  38356. +     "host host", 0,
  38357. + #define    PROGSW    8
  38358. +     "mshproc program", 0,
  38359. + #define    RPOPSW    9
  38360. +     "rpop", RPOPminc (-4),
  38361. + #define    NRPOPSW    10
  38362. +     "norpop", RPOPminc (-6),
  38363. + #define    USERSW    11
  38364. +     "user user", 0,
  38365. + #define    WIDSW    12
  38366. +     "width columns", 0,
  38367. + #define    HELPSW    13
  38368. +     "help", 4,
  38369. +     NULL, 0
  38370. + };
  38371. + /*   */
  38372. + static    char   *bulksw = NULLCP;
  38373. + static    int    snoop = 0;
  38374. + static    int    width = 0;
  38375. + static    char    mailname[BUFSIZ];
  38376. + static    char   *nfs = NULL;
  38377. + static    struct msgs *mp;
  38378. + extern    int    errno;
  38379. + extern    char    response[];
  38380. + /*   */
  38381. + /* ARGSUSED */
  38382. + main (argc, argv)
  38383. + int    argc;
  38384. + char   *argv[];
  38385. + {
  38386. +     int        autosw = 1,
  38387. +         noisy = 1,
  38388. +         rpop;
  38389. +     char   *cp,
  38390. +        *maildir,
  38391. +        *folder = NULL,
  38392. +        *form = NULL,
  38393. +        *format = NULL,
  38394. +        *host = NULL,
  38395. +        *user = NULL,
  38396. +        *pass = NULL,
  38397. +         buf[100],
  38398. +       **ap,
  38399. +       **argp,
  38400. +        *arguments[MAXARGS];
  38401. +     struct stat st;
  38402. +     invo_name = r1bindex (argv[0], '/');
  38403. +     mts_init (invo_name);
  38404. +     if (pophost && *pophost)
  38405. +     host = pophost;
  38406. +     if ((cp = getenv ("MHPOPDEBUG")) && *cp)
  38407. +     snoop++;
  38408. +     if ((cp = m_find (invo_name)) != NULL) {
  38409. +     ap = brkstring (cp = getcpy (cp), " ", "\n");
  38410. +     ap = copyip (ap, arguments);
  38411. +     }
  38412. +     else
  38413. +     ap = arguments;
  38414. +     (void) copyip (argv + 1, ap);
  38415. +     argp = arguments;
  38416. +     rpop = getuid () && !geteuid ();
  38417. + /*   */
  38418. +     while (cp = *argp++) {
  38419. +     if (*cp == '-')
  38420. +         switch (smatch (++cp, switches)) {
  38421. +         case AMBIGSW: 
  38422. +             ambigsw (cp, switches);
  38423. +             done (1);
  38424. +         case UNKWNSW: 
  38425. +             adios (NULLCP, "-%s unknown", cp);
  38426. +         case HELPSW: 
  38427. +             (void) sprintf (buf, "%s [+folder] [switches]", invo_name);
  38428. +             help (buf, switches);
  38429. +             done (1);
  38430. +         case AUTOSW:
  38431. +             autosw = 1;
  38432. +             continue;
  38433. +         case NAUTOSW:
  38434. +             autosw = 0;
  38435. +             continue;
  38436. +         case BULKSW: 
  38437. +             if (!(bulksw = *argp++) || *bulksw == '-')
  38438. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38439. +             continue;
  38440. +         case FORMSW: 
  38441. +             if (!(form = *argp++) || *form == '-')
  38442. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38443. +             format = NULL;
  38444. +             continue;
  38445. +         case FMTSW: 
  38446. +             if (!(format = *argp++) || *format == '-')
  38447. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38448. +             form = NULL;
  38449. +             continue;
  38450. +         case WIDSW: 
  38451. +             if (!(cp = *argp++) || *cp == '-')
  38452. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38453. +             width = atoi (cp);
  38454. +             continue;
  38455. +         case HOSTSW:
  38456. +             if (!(host = *argp++) || *host == '-')
  38457. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38458. +             continue;
  38459. +         case USERSW:
  38460. +             if (!(user = *argp++) || *user == '-')
  38461. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38462. +             continue;
  38463. +         case APOPSW:
  38464. +             rpop = -1;
  38465. +             continue;
  38466. +         case RPOPSW:
  38467. +             rpop = 1;
  38468. +             continue;
  38469. +         case NAPOPSW:
  38470. +         case NRPOPSW:
  38471. +             rpop = 0;
  38472. +             continue;
  38473. +         case PROGSW:
  38474. +             if (!(mshproc = *argp++) || *mshproc == '-')
  38475. +             adios (NULLCP, "missing argument to %s", argp[-2]);
  38476. +             continue;
  38477. +         }
  38478. +     if (*cp == '+' || *cp == '@') {
  38479. +         if (folder)
  38480. +         adios (NULLCP, "only one folder at a time!");
  38481. +         else
  38482. +         folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
  38483. +     }
  38484. +     else
  38485. +         adios (NULLCP, "usage: %s [+folder] [switches]", invo_name);
  38486. +     }
  38487. + /*   */
  38488. +     if (!host)
  38489. +     adios (NULLCP, "usage: %s -h